SqlDataRecord.GetSqlFieldType(Int32) SqlDataRecord.GetSqlFieldType(Int32) SqlDataRecord.GetSqlFieldType(Int32) SqlDataRecord.GetSqlFieldType(Int32) Method

定义

返回 Type 对象,该对象表示映射到 SQL Server 类型列的类型(作为 System.Data.SqlTypes 中定义的 SQL Server 类型)。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

参数

ordinal
Int32 Int32 Int32 Int32

从零开始的列序号。The zero-based ordinal of the column.

返回

形式为 Type 对象的列类型。The column type as a Type object.

异常

ordinal 小于 0 或大于列数(即 FieldCount)。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.

适用于