Share via


SqlDataRecord.GetSqlInt16(Int32) Method

Definition

Gets the value for the column specified by the ordinal as a SqlInt16.

public:
 virtual System::Data::SqlTypes::SqlInt16 GetSqlInt16(int ordinal);
public virtual System.Data.SqlTypes.SqlInt16 GetSqlInt16 (int ordinal);
abstract member GetSqlInt16 : int -> System.Data.SqlTypes.SqlInt16
override this.GetSqlInt16 : int -> System.Data.SqlTypes.SqlInt16
Public Overridable Function GetSqlInt16 (ordinal As Integer) As SqlInt16

Parameters

ordinal
Int32

The zero-based ordinal of the column.

Returns

The column value as a SqlInt16.

Exceptions

The ordinal is less than 0 or greater than the number of columns (that is, FieldCount).

There is a type mismatch.

Applies to