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



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

Parameters

ordinal
Column ordinal (see TdDataReader.GetOrdinal).

Return Value

Returns the value of the specified field represented as a System.Int16 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.Int16. 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 BYTEINT or SMALLINT.

If the column is not of type BYTEINT or SMALLINT, the .NET Data Provider for Teradata uses the .NET Framework class libraries to convert the underlying field to a System.Int16.

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