DBNull is a type and cannot be used as an expression

Posted by VIJI Wednesday, February 24, 2010

This is a compile time error which occurs when checking whether the value is System.DBNULL with the following statement..



If result Is System.DBNULL Then


End If



The correct statement should be



If result Is System.DBNULL.Value Then


End If

0 Responses to DBNull is a type and cannot be used as an expression

Post a Comment