albert albert

albert albert

  • NA
  • 524
  • 0

insert null value

Apr 23 2014 5:35 AM
Hi everybody,
 
I have this:
 
[code]
 
Dim IJavaValue As String = "" '= System.DBNull.Value.ToString()
If String.IsNullOrEmpty(IJavaValue.ToString().Trim) = True Then
IJavaValue = DBNull.Value
End If
[/code] 
 
Then I get the message: Error 43 Value of type 'System.DBNull' cannot be converted to 'String'
 
And if I try this:  IJavaValue = DBNull.Value.ToString()
 
But then If I look in the Databse I see an empty column and not the value 'NULL' in the column
 
Thank you 

Answers (3)