I have the following code:
dsParticippantInfo.Tables(0).Rows(0)("Contract_Amt")
Which has value of DBnull.
now I want to compare it:
if dsParticippantInfo.Tables(0).Rows(0)("Contract_Amt")=nothing
....
...
I get
Run-time exception thrown : System.InvalidCastException - Operator is not valid for type 'DBNull' and 'Nothing'.
Ideas how to compare this value to see if it contains a DBnull
?
if dsParticippantInfo.Tables(0).Rows(0)("Contract_Amt")=system.DBnull
also returns an error.