Hi everybody,
I have a integer column and I want in vb code behind that the column will be filled wiht NULL - so empty value.
I try like this: Dim IInpUserKey As Nullable(Of Integer)
But then I still see the vlaue 0 and not NULL in the column.
Thank you
VulpesPosted Apr 16, 2014, 10:44 AM
If you keep getting a zero inserted, are you sure that it actually allows NULLs?
albert albertPosted Apr 16, 2014, 11:39 AM
albert albertPosted Apr 16, 2014, 10:01 AM
Then I get this error:
albert albertPosted Apr 16, 2014, 9:55 AM
Dim IInpUserKey As Integer = DBNull.Value.ToString()
But that doesnt work. And If I try like this:
Dim IInpUserKey As String = DBNull.Value.ToString()
Then I still get a 0 in de database
VulpesPosted Apr 16, 2014, 9:48 AM
http://msdn.microsoft.com/en-us/library/system.dbnull.value(v=vs.110).aspx