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



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

Parameters

ordinal
Column ordinal (see TdDataReader.GetOrdinal).

Return Value

Returns the .NET Data Provider for Teradata 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

GetProviderSpecificFieldType specifies the .NET Framework data type of the column.

For those Teradata Data Types that have a corresponding Provider Specific Types, the following Type is returned depending upon the setting of the corresponding ENABLE Provider Type Connection String Attribute. Refer to the Enabling Provider Specific Types page in the Developer's Guide for more information.

Teradata Data Type of Column Type Returned
Connection String Attribute, Type Returned
DECIMAL

TdConnectionStringBuilder.EnableTdDecimal = true, TdDecimal

EnableTdDecimal = false, Decimal

DATE

TdConnectionStringBuilder.EnableTdDateTime = true, TdDate

EnableTdDateTime = false, DateTime

TIME

EnableTdDateTime = true, TdTime

EnableTdDateTime = false, TimeSpan

TIME WITH TIME ZONE

EnableTdDateTime = true, TdTimeWithTimeZone

EnableTdDateTime = false, String

TIMESTAMP

EnableTdDateTime = true, TdTimestamp

EnableTdDateTime = false, System.DateTime

TIMESTAMP WITH TIME ZONE

EnableTdDateTime = true, TdTimestampWithTimeZone

EnableTdDateTime = false, the value will depend upon the setting of EnableDateTimeOffset.

EnableDateTimeOffset = true, DateTimeOffset

EnableDateTimeOffset = false, System.String

PERIOD(DATE)

TdPeriodDate

PERIOD(TIME)

TdPeriodTime

PERIOD(TIME WITH TIME ZONE)

TdPeriodTimeWithTimeZone

PERIOD(TIMESTAMP)

TdPeriodTimestamp

PERIOD(TIMESTAMP WITH TIME ZONE

TdPeriodTimestampWithTimeZone

BLOB

TdBlob

CLOB

TdClob

INTERVAL

TdConnectionStringBuilder.EnableTdIntervals = true, the INTERVAL types will be returned depending upon the INTERVAL column type as TdIntervalYear, TdIntervalMonth, TdIntervalYearToMonth, TdIntervalDay, TdIntervalDayToSecond, TdIntervalDayToMinute, TdIntervalDayToHour, TdIntervalHour, TdIntervalHourToSecond, TdIntervalHourToMinute, TdIntervalMinute, TdIntervalMinuteToSecond and TdIntervalSecond

EnableTdIntervals = false, System.String

There is no corresponding ENABLE Connection String Attribute for LOB or Period types.

The TdBlob and TdClob Provider Specific Types are returned when the data from a BLOB and CLOB columns are retrieved in deferred mode.

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
Enabling Provider Specific Types
EnableTdDecimal
EnableTdDateTime