SqlDataRecord.GetFieldType(Int32) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Returns a Type object representing the common language runtime (CLR) type that maps to the SQL Server type of the column specified by the ordinal
argument.
public:
virtual Type ^ GetFieldType(int ordinal);
public virtual Type GetFieldType (int ordinal);
abstract member GetFieldType : int -> Type
override this.GetFieldType : int -> Type
Public Overridable Function GetFieldType (ordinal As Integer) As Type
Parameters
- ordinal
- Int32
The zero-based ordinal of the column.
Returns
The column type as a Type object.
Implements
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.