OracleDataReader.FieldCount 屬性

定義

取得目前資料列中的資料行數目。

public:
 property int FieldCount { int get(); };
public:
 virtual property int FieldCount { int get(); };
public int FieldCount { get; }
public override int FieldCount { get; }
member this.FieldCount : int
Public ReadOnly Property FieldCount As Integer
Public Overrides ReadOnly Property FieldCount As Integer

屬性值

當未置於有效的資料錄集中時,則為 0,否則為目前資料錄中的資料行數目。 預設值為 -1。

實作

例外狀況

沒有對資料來源的目前連接。

備註

包含隱藏欄位。 使用 VisibleFieldCount 以排除隱藏欄位。

執行不會傳回數據列的查詢之後, FieldCount 會傳回 0。

適用於