all groups > vb.net data > august 2006 >
You're in the

vb.net data

group:

null ID


null ID John
8/1/2006 8:02:12 AM
vb.net data:

I am using the table adapter to add a new item to a table. One of the items
is an ID for a another table. At this point that item in the other table
doesn't exist so how can I enter Null or similar? I have been receiving
this error when I try dbnull.value :

Error 1 Value of type 'System.DBNull' cannot be converted to
'System.Nullable(Of Integer)

Re: null ID Shifted
9/7/2006 1:30:41 AM
Use System.DBNull.Value instead of System.DBNull. DBNull is a singleton
class that cannot be created, and to use its value, you need to explicitly
reference the .Value property.

-Ron

[quoted text, click to view]

AddThis Social Bookmark Button