>>But it's pointless - a .NET string is *never* DBNull.Value......
>
>If you do a select, get that record into a DataRow, and one of the table field was null, initialize loRow("FirstName") to that variable would make it null, isn't it?
But DataRow Items are Objects that must be cast to the relevant .NET type - and this can only be done if they are not DBNull.Value. So e.g:
dr("SomeString") = DBNull.Value
Dim s As String
If dr("SomeString") Is DBNull.Value Then
s = Nothing
Else
s = CStr(dr("SomeString"))
End If
(so s cannot be DBNull.Value)
If you're dealing with an integer data item in a DataRow you can test using:
dr.IsNull("SomeInt")