check for dbNull is throwing an error

G

Guest

the following simple check for a null valuse is throwing an error
If IsDBNull(Me.DsMem1.usr(0).usrCoState) Then
Response.Write(STAt)
End If
DSMem is a dataset and the value is null. I thought this would check for
null, but it throws an error saying DBNull can not be cast to string?
any help to point out the obvious would be appreciated
thnaks
kes
 
G

Guest

ver mind i use an sp to retreave the data into a dataset and the sp didnot
include the field it did not error on fill even though the dataset had a
field defined no value, not even a DBNull was retreaved => error. My best
guess, because now it works when the sp includes the field /w value null.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,767
Messages
2,569,572
Members
45,045
Latest member
DRCM

Latest Threads

Top