SqlDataRecord.GetFieldType(Int32) SqlDataRecord.GetFieldType(Int32) SqlDataRecord.GetFieldType(Int32) SqlDataRecord.GetFieldType(Int32) Method

定义

返回一个 Type 对象,该对象表示映射到 ordinal 参数指定的列的 SQL Server 类型的公共语言运行时 (CLR) 类型。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

参数

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.

适用于