Send feedback on this topic.
Teradata.Client.Provider
GetFieldValue<T> Method



Teradata.Client.Provider Namespace > TdDataReader Class : GetFieldValue<T> Method
The type of the value to be returned.
Column ordinal (see TdDataReader.GetOrdinal).
Gets the value of the specified column.
Syntax
'Declaration
 
Public Overrides NotOverridable Function GetFieldValue(Of T)( _
   ByVal ordinal As Integer _
) As T
'Usage
 
Dim instance As TdDataReader
Dim ordinal As Integer
Dim value As T
 
value = instance.GetFieldValue(Of T)(ordinal)
public override T GetFieldValue<T>( 
   int ordinal
)
public:
T^ GetFieldValuegeneric<typename T>
( 
   int ordinal
) override 

Parameters

ordinal
Column ordinal (see TdDataReader.GetOrdinal).

Type Parameters

T
The type of the value to be returned.

Return Value

Returns the value of the specified field represented as a T type.
Exceptions
ExceptionDescription
The TdDataReader is closed.
ordinal is less than zero or ordinal is equal to or greater than TdDataReader.FieldCount.
Type T is not supported for this column.
CommandBehavior is set to SchemaOnly, or there is no data for the row or column, or preceding columns are no longer accessible.
The Teradata Database returned an error, or .NET Data Provider for Teradata detected an error.
Remarks
Supported types:
               Int16    Int32    Int64      Decimal    Double    Single     Boolean
               Int16?   Int32?   Int64?     Decimal?   Double?   Single?    Boolean?
               Byte     Char     DateTime   TimeSpan   DateTimeOffset       Byte[] 
               Byte?    Char?    DateTime?  TimeSpan?  DateTimeOffset?      Char[]
               Object   SByte    SByte?     String     Stream    XmlReader  TextReader
               
               Plus all Teradata provider specific types
            
Requirements

Target Platforms: Windows 7, Windows 8, Windows 8.1, Windows 10, Windows Server 2008, Windows Server 2008 R2, Windows Server 2012, Windows Server 2012 R2

See Also

Reference

TdDataReader Class
TdDataReader Members