SqlDataRecord.GetSqlInt32(Int32) Method

Definition

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

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

Parameters

ordinal
Int32

The zero-based ordinal of the column.

Returns

The column value as a SqlInt32.

Exceptions

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

There is a type mismatch.

Applies to