Results 1 to 13 of 13
Mar 8, 2012, 14:19 #1
- Join Date
- Mar 2012
- 0 Post(s)
- 0 Thread(s)
ADODB.RecordSet object give me an empty value when asked for some fields.
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
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 objRS1.MoveFirst 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>" objRS1.MoveNext Loop End if
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.