How are you supposed to handle NULL values when retrieving data from a database. I have a table with three attributes namely, (ID: integer, Name: varchar(32), Type: integer). However, the Type attribute can be NULL. Well, when you try to get the data back from the database via a VB recordset by going
Dim Type As Long
...
Type = MyRecSet(2)
You get a runtime error: "Invalid use of Null". My question is how do I deal with this scenario, namely check if a field value is Null and take appropriate action?
Thanks,
-bitwise
Dim Type As Long
...
Type = MyRecSet(2)
You get a runtime error: "Invalid use of Null". My question is how do I deal with this scenario, namely check if a field value is Null and take appropriate action?
Thanks,
-bitwise