Export (0) Print
Expand All

IDataRecord.IsDBNull Method

Return whether the specified field is set to null.

[Visual Basic]
Function IsDBNull( _
   ByVal i As Integer _
) As Boolean
bool IsDBNull(
   int i
bool IsDBNull(
   int i
function IsDBNull(
   i : int
) : Boolean;


The index of the field to find.

Return Value

true if the specified field is set to null, otherwise false.


Exception Type Condition
IndexOutOfRangeException The index passed was outside the range of 0 through FieldCount.


Call this method to check for null column values before calling the typed get methods (for example, GetByte, GetChar, and so on) to avoid raising an error.


Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, .NET Compact Framework

See Also

IDataRecord Interface | IDataRecord Members | System.Data Namespace

© 2014 Microsoft