M
michael
I have a Strongly Typed DataSet. I need to know if the value of a field in a
row is DBNULL.value before I use it. I have been obtaining the StronglyTyped
DataRow of the table and testing to see if it's "is DBNULL.value". However,
I'm getting the following exception thrown when the value truly is null:
Catch e As Global.System.InvalidCastException
Throw New Global.System.Data.StrongTypingException("The
value for column 'PID_F18_C2' in table 'CEN_Segment_PID_A' is DBNull.", e)
End Try
If instead of testing the strongly typed datarow I use an ordinary DataRow,
I can easily do the test "drTestRow is DBNULL.value".
How can I test if a value in a StronglyTypedDataRow is null?
row is DBNULL.value before I use it. I have been obtaining the StronglyTyped
DataRow of the table and testing to see if it's "is DBNULL.value". However,
I'm getting the following exception thrown when the value truly is null:
Catch e As Global.System.InvalidCastException
Throw New Global.System.Data.StrongTypingException("The
value for column 'PID_F18_C2' in table 'CEN_Segment_PID_A' is DBNull.", e)
End Try
If instead of testing the strongly typed datarow I use an ordinary DataRow,
I can easily do the test "drTestRow is DBNULL.value".
How can I test if a value in a StronglyTypedDataRow is null?