Send feedback on this topic.
Teradata.Client.Provider
GetFieldType Method



Teradata.Client.Provider Namespace > TdDataReader Class : GetFieldType Method
Column ordinal (see TdDataReader.GetOrdinal).
Gets the .NET data type (System.Type) of the column.
Syntax
'Declaration
 
Public Overrides NotOverridable Function GetFieldType( _
   ByVal ordinal As Integer _
) As Type
'Usage
 
Dim instance As TdDataReader
Dim ordinal As Integer
Dim value As Type
 
value = instance.GetFieldType(ordinal)
public override Type GetFieldType( 
   int ordinal
)
public:
Type^ GetFieldType( 
   int ordinal
) override 

Parameters

ordinal
Column ordinal (see TdDataReader.GetOrdinal).

Return Value

Returns the Type of the column.
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.
Remarks
GetFieldType specifies the .NET Framework data type of the column. The information can be used to call the corresponding strongly typed Get method (for example, GetInt32 or GetDouble) to retrieve the field value.
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