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

VulpesRank #55 · 29.2K reputationPosted Apr 16, 2014, 6:44 AM EDT
If you keep getting a zero inserted, are you sure that it actually allows NULLs?
VulpesRank #55 · 29.2K reputationPosted Apr 16, 2014, 5:48 AM EDT
http://msdn.microsoft.com/en-us/library/system.dbnull.value(v=vs.110).aspx
albert albertRank #2,683 · 519 reputationPosted Apr 16, 2014, 5:55 AM EDT
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
albert albertRank #2,683 · 519 reputationPosted Apr 16, 2014, 6:01 AM EDT
Then I get this error:
albert albertRank #2,683 · 519 reputationPosted Apr 16, 2014, 7:39 AM EDT