SqlDataReader.Item[] 屬性
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
取得欄位的原始格式值。
多載
| 名稱 | Description |
|---|---|
| Item[Int32] |
取得指定資料行的原生格式,指定資料行序數的值。 |
| Item[String] |
取得指定數據行名稱的原生格式指定數據行的值。 |
Item[Int32]
取得指定資料行的原生格式,指定資料行序數的值。
public:
virtual property System::Object ^ default[int] { System::Object ^ get(int i); };
public:
property System::Object ^ default[int] { System::Object ^ get(int i); };
public override object this[int i] { get; }
public object this[int i] { get; }
member this.Item(int) : obj
Default Public Overrides ReadOnly Property Item(i As Integer) As Object
Default Public ReadOnly Property Item(i As Integer) As Object
參數
- i
- Int32
零基列序數。
屬性值
指定欄位的本體格式值。
實作
例外狀況
通過的指數超出0到 FieldCount範圍。
另請參閱
適用於
Item[String]
取得指定數據行名稱的原生格式指定數據行的值。
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
數據行名稱。
屬性值
指定欄位的本體格式值。
實作
例外狀況
未找到指定名稱的柱子。
備註
首先會執行大小寫區分查詢。 若失敗,則進行第二次大小寫不區分的搜尋(使用資料庫整合進行大小寫不區分比較)。 當比較受培養物特定套管規則影響時,可能會產生意想不到的結果。 例如,在土耳其語中,以下範例會得到錯誤的結果,因為土耳其語的檔案系統並未對「file」中的字母「i」使用語言大小寫規則。
這種方法對假名寬度不敏感。