SqlDataRecord.GetSqlFieldType(Int32) Method

Definition

Returns a Type object that represents the type (as a SQL Server type, defined in System.Data.SqlTypes) that maps to the SQL Server type of the column.

public:
 virtual Type ^ GetSqlFieldType(int ordinal);
public virtual Type GetSqlFieldType (int ordinal);
abstract member GetSqlFieldType : int -> Type
override this.GetSqlFieldType : int -> Type
Public Overridable Function GetSqlFieldType (ordinal As Integer) As Type

Parameters

ordinal
Int32

The zero-based ordinal of the column.

Returns

The column type as a Type object.

Exceptions

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

The column is of a user-defined type that is not available to the calling application domain.

The column is of a user-defined type that is not available to the calling application domain.

There is a type mismatch.

Applies to