|
-
January 23rd, 2007, 06:59 AM
#1
ERROR: Operator '=' is not defined for type 'DBNull' ...
Operator '=' is not defined for type 'DBNull' and string "Option".
I get this above mentioned error while running the application and the following is the code where I get this error.
If dr("Option") = "Option1" Then
...
...
...
End If
I know this happens when there is no record in the DB and has a value 'NULL". But I don't know how to handle this? Please guide me. Thank you!
-
January 23rd, 2007, 09:13 AM
#2
Re: ERROR: Operator '=' is not defined for type 'DBNull' ...
Code:
If dr("Option") isnot DBNull.Value andalso dr("Option") = "Option1" Then
.....
End If
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|