OdbcDataReader.GetChar(Int32) 方法

定义

获取指定列的字符形式的值。Gets the value of the specified column as a character.

public:
 override char GetChar(int i);
public:
 virtual char GetChar(int i);
public override char GetChar (int i);
public char GetChar (int i);
override this.GetChar : int -> char
abstract member GetChar : int -> char
override this.GetChar : int -> char
Public Overrides Function GetChar (i As Integer) As Char
Public Function GetChar (i As Integer) As Char

参数

i
Int32

从零开始的列序号。The zero-based column ordinal.

返回

Char

指定列的字符形式的值。The value of the specified column as a character.

实现

例外

指定的强制转换无效。The specified cast is not valid.

注解

基于 ODBC 驱动程序的基础功能执行转换。Conversions are performed based on the underlying capabilities of the ODBC driver. 如果不支持转换,则方法调用将失败。If the conversion is not supported, the method call fails.

调用 IsDBNull 此方法之前,调用以查找 null 值。Call IsDBNull to look for null values before calling this method.

适用于