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



Teradata.Client.Provider Namespace > TdDataReader Class : GetChar Method
Column ordinal (see TdDataReader.GetOrdinal).
Gets the value of the specified field (column) as a character.
Syntax
'Declaration
 
Public Overrides NotOverridable Function GetChar( _
   ByVal ordinal As Integer _
) As Char
'Usage
 
Dim instance As TdDataReader
Dim ordinal As Integer
Dim value As Char
 
value = instance.GetChar(ordinal)
public override char GetChar( 
   int ordinal
)
public:
char GetChar( 
   int ordinal
) override 

Parameters

ordinal
Column ordinal (see TdDataReader.GetOrdinal).

Return Value

The value of the specified field represented as a System.Char type.
Exceptions
ExceptionDescription
ordinal is less than zero or ordinal is equal to or greater than TdDataReader.FieldCount.
The field cannot be converted into System.Char. A null field will result in an exception.
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
Use this method to retrieve columns of type CHAR or VARCHAR. If the column is of type character, then the first character of the field is returned.
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