OdbcDataReader.Item[String] 属性

定义

获取以本机格式表示的列的值。Gets the value of a column in its native format.

重载

Item[Int32]

在给定列序号的情况下,获取指定列的以本机格式表示的值。Gets the value of the specified column in its native format given the column ordinal.

Item[String]

在给定列名称的情况下,获取指定列的以本机格式表示的值。Gets the value of the specified column in its native format given the column name.

Item[Int32]

在给定列序号的情况下,获取指定列的以本机格式表示的值。Gets the value of the specified column in its native format given the column ordinal.

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

列序号。The column ordinal.

属性值

指定列的以本机格式表示的值。The value of the specified column in its native format.

实现

例外

传递的索引位于 0 至 FieldCount 的范围之外。The index passed was outside the range of 0 through FieldCount.

另请参阅

Item[String]

在给定列名称的情况下,获取指定列的以本机格式表示的值。Gets the value of the specified column in its native format given the column name.

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

参数

value
String

列名称。The column name.

属性值

指定列的以本机格式表示的值。The value of the specified column in its native format.

实现

例外

未找到具有指定名称的列。No column with the specified name was found.

注解

首先执行区分大小写的查找。A case-sensitive lookup is performed first. 如果失败,将进行第二个不区分大小写的搜索。If it fails, a second case-insensitive search is made.

此方法不区分假名宽度。This method is kana-width insensitive.

另请参阅

适用于