SqlDataRecord.GetSqlFieldType(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 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.