共用方式為


SqlDataRecord.GetFieldType(Int32) 方法

定義

傳回 Type 物件,代表 Common Language Runtime (CLR) 類型,該類型對應至 ordinal 引數指定之資料行的 SQL Server 類型。

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

資料行以零為起始的序數。

傳回

做為 Type 物件的資料行類型。

實作

例外狀況

ordinal 小於 0 或大於資料行數目 (亦即 FieldCount)。

資料行是使用者定義的類型,不提供呼叫的應用程式定義域使用。

資料行是使用者定義的類型,不提供呼叫的應用程式定義域使用。

類型不符。

適用於