OdbcDataReader.GetByte(Int32) 方法

定义

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

public:
 override System::Byte GetByte(int i);
public:
 virtual System::Byte GetByte(int i);
public override byte GetByte (int i);
public byte GetByte (int i);
override this.GetByte : int -> byte
abstract member GetByte : int -> byte
override this.GetByte : int -> byte
Public Overrides Function GetByte (i As Integer) As Byte
Public Function GetByte (i As Integer) As Byte

参数

i
Int32

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

返回

Byte

作为字节形式的指定列的值。The value of the specified column as a byte.

实现

例外

指定的强制转换无效。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.

适用于