OdbcDataReader.GetString(Int32) 方法

定义

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

public:
 override System::String ^ GetString(int i);
public:
 virtual System::String ^ GetString(int i);
public override string GetString (int i);
public string GetString (int i);
override this.GetString : int -> string
abstract member GetString : int -> string
override this.GetString : int -> string
Public Overrides Function GetString (i As Integer) As String
Public Function GetString (i As Integer) As String

参数

i
Int32

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

返回

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

实现

例外

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

适用于

另请参阅