I would like to test SQL output parameters for NULL values. What I have realised is that SQLString.NULL is not equal to DBNull.Value. My question is, is there a more general way of checking a parameter for null values?
Ideally I do not want to have to check each parameter based on their SQL type, e.g. integer parameters SqlTypes.SqlInt32.Null.
Here is a snippet of my code:
.ExecuteStoredProcedure("spGetClientDetails")
If CInt(.Parameters("@return_val").Value) = 0 Then
If myParams(1).SqlValue.Equals(SqlTypes.SqlString.Null) Or myParams(1).SqlValue.Equals(System.DBNull.Value) Then
Claimants = ""
Else...