i'm having some issues with an ADODB.RecordSet object. With Classic ASP and VBScript, i'm trying to recover data from this particular object. it is connected to and local SQL Server Express 2008 R2, and it was openned with an statement like this:
strSQL1 ="SELECT * from ((manutint mi LEFT OUTER JOIN manutint_codDoc md ON  mi.mi_documento=md.doc_cod) LEFT OUTER JOIN cliente cl ON mi.mi_cliente=cl.cli_cod) LEFT OUTER JOIN fornecedores fr on mi.mi_encaminhadoa=fr.frn_cod and mi.mi_encaminhadoa = fr.frn_cod WHERE mi.mi_status<>4 and "
&_ " mi.mi_clientecc LIKE '"&cc&"' AND mi.mi_entrada LIKE '"&keyword22&"' order by mi.mi_cod"
Set objRS1 = Server.CreateObject("ADODB.RecordSet")
objRS1.Open strSQL1, objConn
where cc and keyword22 are used for search purposes only. they both are simple "%" in my tests. objConn as you guess, are an ADODB.Connection object that should be working just fine, since it's used for all pages of the site and the problem is only in one page.
The page code is awful big, so it would be no good to post it all. the bit that should work but dont is:
if Not objRS1.EOF Then 
	Do While Not objRS1.EOF
                Response.write "<tr>"
                Response.Write "<td>" &  objRS1("cli_nome")& "</td>"
		Response.Write "<td>" &  objRS1("mi_dataentrada")& "</td>"
		Response.Write "<td >" &  objRS1("frn_nome")& "</td>"	
		Response.Write "<td >" &  objRS1("mi_equipamento")& "</td>"	
		Response.Write "<td >" &  objRS1("mi_ns")& "</td>"
		Response.Write "<td >" & objRS1("doc_desc") &"</td>"
		Response.Write "<td >" & objRS1("mi_numdocumento") &"</td>"
                Response.Write "</tr>"
End if
This code is used to fill an table with the data of the objRS1, which is our ADODB.RecordSet object.
this code has no erros and should work with no problem, but exactly the fields "doc_desc" and "mi_numdocumento" are showed as "", empty values. Of course I looked into the database tables and executed the exactly same SQL query in MS SQL Management Studio to check if there was data into the database in the first place, but it was ok. Also tried to search some kind of difference between the fields that work and those that don't, to no avail. also tried to do some IsNull() and other checks with the values given by objRS1, and they returned false. it as if the field's content was an "", but it is not.
Did someone has ever seen something like this? is there some kind of test that i could do to track down the problem that i still didn't?
any help or suggestion is apreciated. even an small guess. already lost 4 hours into this.