This documentation is archived and is not being maintained.
IDataRecord.IsDBNull Method
.NET Framework 1.1
Return whether the specified field is set to null.
[Visual Basic] Function IsDBNull( _ ByVal i As Integer _ ) As Boolean [C#] bool IsDBNull( int i ); [C++] bool IsDBNull( int i ); [JScript] function IsDBNull( i : int ) : Boolean;
Parameters
- i
- The index of the field to find.
Return Value
true if the specified field is set to null, otherwise false.
Exceptions
| Exception Type | Condition |
|---|---|
| IndexOutOfRangeException | The index passed was outside the range of 0 through FieldCount. |
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, .NET Compact Framework
See Also
IDataRecord Interface | IDataRecord Members | System.Data Namespace
Show: