OdbcDataReader.GetBoolean(Int32) 方法

定义

获取指定列的布尔值形式的值。Gets the value of the specified column as a Boolean.

public:
 override bool GetBoolean(int i);
public:
 virtual bool GetBoolean(int i);
public override bool GetBoolean (int i);
public bool GetBoolean (int i);
override this.GetBoolean : int -> bool
abstract member GetBoolean : int -> bool
override this.GetBoolean : int -> bool
Public Overrides Function GetBoolean (i As Integer) As Boolean
Public Function GetBoolean (i As Integer) As Boolean

参数

i
Int32

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

返回

一个表示列值的布尔值。A Boolean that is the value of the column.

实现

例外

指定的强制转换无效。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 then the method call will fail.

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

适用于

另请参阅