PDA

View Full Version : where is the record ?


Daniel
06-12-02, 06:27
I have a problem that I can't seem to figure out.
This statement gives me a recordset called rsValves

Select * From qryVentilerOchPlatser Where vDelnr LIKE 'DM%' And pId is not Null Order by vDelnr

and this line of could should give me the following printout, right ?

Response.Write rsValves("vID") & " | " & rsValves("vDelnr") & " | " & rsValves("vFabrikat")

Printout: 6070 | DM001 | NAF

but instead I get this

6070 | | NAF

why is the middle column missing ???

Please, help !!

/ Daniel

jolopy328
06-13-02, 15:11
I would suspect that your problem is caused by one of two things:

1) The value of the field is NULL

2) The field was previously reference in the recordset, and because of certain settings for your connection/recordset the value was cleared out.

For example:
'-----------------
Set myRS = myConn.Execute("SELECT f1, f2 FROM t1")

If myRS("f1") = "yes" Then
Response.Write("f1 = " & myRS("f1"))
Else
Response.Write("f2 = " & myRS("f2"))
End If
'-----------------

If f1 is "yes" then you will see the following on the page:

f1 =

This happens because the value was cleared out of the recordset when it was reference in the If Expression.

Hope this helps...

Daniel
06-14-02, 03:16
Ahh, it's cleared out?!?!

Well, you live you learn... ;)

Thank you

/ Daniel