hey guys,
OK, I've been beating my head on my desk trying to figure this out, and its driving me nuts!!!
Consider the following:
If .Item(3) Is Null Then
Return 0
Else
Return 1
End If
Now, in vb6 I know this would work, but now in .NET it doesn't due to DBNull or whatever they use. Problem is, I can't find anything describing HOW to use it. For instance, do I:
a) test for nothing? If .Item(3) Is Nothing Then...
I've tried this, but couldn't get it to work
b) test for dbnull? If .Item(3) Is DBNull Then...
This also craps out.
c) Create a variable of type dbnull and test against taht?
Dim r as DBNull
If .Item(3) IS r Then...
but that doesn't seem to work either
AAARRRGGGHHHH!!!!! Can someone please explain?
Thanks,
Jack
OK, I've been beating my head on my desk trying to figure this out, and its driving me nuts!!!
Consider the following:
If .Item(3) Is Null Then
Return 0
Else
Return 1
End If
Now, in vb6 I know this would work, but now in .NET it doesn't due to DBNull or whatever they use. Problem is, I can't find anything describing HOW to use it. For instance, do I:
a) test for nothing? If .Item(3) Is Nothing Then...
I've tried this, but couldn't get it to work
b) test for dbnull? If .Item(3) Is DBNull Then...
This also craps out.
c) Create a variable of type dbnull and test against taht?
Dim r as DBNull
If .Item(3) IS r Then...
but that doesn't seem to work either
AAARRRGGGHHHH!!!!! Can someone please explain?
Thanks,
Jack