IsDBNull Function

   
IsDBNull Function

Class

Microsoft.VisualBasic.Information

Syntax

 IsDBNull(   expression   ) 
expression (required; any expression)

Return Value

Boolean

Description

Determines whether expression evaluates to DbNull (that is, is equal to System.DbNull.Value).

Rules at a Glance

  • DbNull is not the same as Nothing or an empty string. DbNull is used to denote the fact that a variable contains a missing or nonexistent value, and it is used primarily in the context of database field values.

  • Since any expression that contains DbNull evaluates to DbNull , an expression such as:

     If var = DbNull Then 

    will always fail. The only way to test for a DbNull value is to use IsDbNull .

VB.NET/VB 6 Differences

The IsDBNull function is new to VB.NET.

   


VB.Net Language in a Nutshell
VB.NET Language in a Nutshell
ISBN: B00006L54Q
EAN: N/A
Year: 2002
Pages: 503

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net