Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

SqlDataReader.IsDBNull Method

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

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

Parameters

i
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, .NET Compact Framework

See Also

SqlDataReader Class | SqlDataReader Members | System.Data.SqlClient Namespace

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.