Send feedback on this topic.
Teradata.Client.Provider
IsDBNull Method (TdDataReader)



Teradata.Client.Provider Namespace > TdDataReader Class : IsDBNull Method
Column ordinal (see TdDataReader.GetOrdinal).
Indicates whether the field is null.
Syntax
'Declaration
 
Public Overrides NotOverridable Function IsDBNull( _
   ByVal ordinal As Integer _
) As Boolean
'Usage
 
Dim instance As TdDataReader
Dim ordinal As Integer
Dim value As Boolean
 
value = instance.IsDBNull(ordinal)
public override bool IsDBNull( 
   int ordinal
)
public:
bool IsDBNull( 
   int ordinal
) override 

Parameters

ordinal
Column ordinal (see TdDataReader.GetOrdinal).

Return Value

Returns true if the value of the specified field (i) is null.
Exceptions
ExceptionDescription
ordinal is less than zero or ordinal is equal to or greater than TdDataReader.FieldCount.
CommandBehavior is set to SchemaOnly, or there is no data for the row or column, or preceding columns are no longer accessible.
The TdDataReader is closed.
The Advanced SQL Engine returned an error, or .NET Data Provider for Teradata detected an error.
Remarks
Call this method to check whether the field is null. The primitive data types cannot represent null values. Therefore the typed get methods (for example, GetInt32) will throw an exception when the field is null.
Requirements

Target Platforms: Windows 8.1, Windows 10, Windows Server 2012 R2, Windows Server 2016, Windows Server 2019

See Also

Reference

TdDataReader Class
TdDataReader Members