IsDBNull method

Description

Identifies a value indicating whether the column contains null values.

Syntax

bool IsDBNull( int ordinal )

Parameters

ordinal: The zero-based column ordinal.

Return value

“True” if the specified column value is equivalent to DBNull; otherwise, “false.”

Implements

IDataRecord.IsDbNull

Usage

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 exception.