View Single Post
  #1 (permalink)  
Old December 4th, 2006, 02:16 AM
Aaron Edwards Aaron Edwards is offline
Friend of Wrox
 
Join Date: Apr 2004
Location: San Francisco, CA, USA.
Posts: 204
Thanks: 0
Thanked 0 Times in 0 Posts
Default Nullable Type Question

I have a variable defined as Nullable (Of Int32). But I can't seem to assign it a value of DBNull. Seems it can only take VBNull. How the heck am I supposed to use it with a database then? The following code breaks every time a null value comes out of the database:

dim myNullableInt as Nullable (of Int32)
myNullableInt = myDataReader("myPossiblyNullField")

HELP!

Aaron