The expression to be evaluated against System.DBNull
Description
The IsDBNull function determines whether expression evaluates to System.DbNull (true) or not (False).
Usage at a Glance
DbNull is not the same as Nothing or an empty string. DbNull is used to denote a missing or nonexistent value, and it is used primarily in the context of database field values.
Because of the way that VB deals with expressions containing DBNull, you cannot simply compare a variable to DBNull, as in:
If (someVariable = DbNull) Then
You must make the comparison using the IsDbNull function.
If (IsDBNull(someVariable) = True) Then
Version Differences
The IsDBNull function is new with VB under .NET.
Visual Basic 2005 includes a new IsNullOrEmpty method as part of the String data type that may better meet your needs.