OleDbDataReader.Item[] 屬性

定義

取得使用原生格式的資料行值。

多載

Item[Int32]

提供資料行序數,取得使用原生格式的指定資料行值。

Item[String]

提供資料行名稱,取得使用原生格式的指定資料行值。

Item[Int32]

來源:
OleDbDataReader.cs
來源:
OleDbDataReader.cs
來源:
OleDbDataReader.cs

提供資料行序數,取得使用原生格式的指定資料行值。

public:
 virtual property System::Object ^ default[int] { System::Object ^ get(int index); };
public:
 property System::Object ^ default[int] { System::Object ^ get(int index); };
public override object this[int index] { get; }
public object this[int index] { get; }
member this.Item(int) : obj
Default Public Overrides ReadOnly Property Item(index As Integer) As Object
Default Public ReadOnly Property Item(index As Integer) As Object

參數

index
Int32

資料行序數。

屬性值

原生格式的指定資料行值。

實作

例外狀況

傳遞的索引超出 0 到 FieldCount 的範圍。

另請參閱

適用於

Item[String]

來源:
OleDbDataReader.cs
來源:
OleDbDataReader.cs
來源:
OleDbDataReader.cs

提供資料行名稱,取得使用原生格式的指定資料行值。

public:
 virtual property System::Object ^ default[System::String ^] { System::Object ^ get(System::String ^ name); };
public:
 property System::Object ^ default[System::String ^] { System::Object ^ get(System::String ^ name); };
public override object this[string name] { get; }
public object this[string name] { get; }
member this.Item(string) : obj
Default Public Overrides ReadOnly Property Item(name As String) As Object
Default Public ReadOnly Property Item(name As String) As Object

參數

name
String

資料行名稱。

屬性值

原生格式的指定資料行值。

實作

例外狀況

找不到具有指定名稱的資料行。

備註

會先執行區分大小寫的查閱。 如果失敗,則會進行第二個不區分大小寫的搜尋。

這個方法不區分假名寬度。

另請參閱

適用於