Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

OleDbDataReader.IsDBNull Method

Gets a value indicating whether the column contains non-existent or missing values.

[Visual Basic]
Public Overridable Function IsDBNull( _
   ByVal ordinal As Integer _
) As Boolean Implements IDataRecord.IsDBNull
[C#]
public virtual bool IsDBNull(
 int ordinal
);
[C++]
public: virtual bool IsDBNull(
 int ordinal
);
[JScript]
public function IsDBNull(
   ordinal : int
) : Boolean;

Parameters

ordinal
The zero-based column ordinal.

Return Value

true if the specified column value is equivalent to DBNull; otherwise, false.

Implements

IDataRecord.IsDBNull

Remarks

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.

Requirements

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

See Also

OleDbDataReader Class | OleDbDataReader Members | System.Data.OleDb Namespace

Show:
© 2015 Microsoft