SqlDataRecord.GetSqlValue(Int32) SqlDataRecord.GetSqlValue(Int32) SqlDataRecord.GetSqlValue(Int32) SqlDataRecord.GetSqlValue(Int32) Method

定义

返回表示为 SQL Server 类型,由列序号指定的列中存储的数据值。Returns the data value stored in the column, expressed as a SQL Server type, specified by the column ordinal.

public:
 virtual System::Object ^ GetSqlValue(int ordinal);
public virtual object GetSqlValue (int ordinal);
abstract member GetSqlValue : int -> obj
override this.GetSqlValue : int -> obj
Public Overridable Function GetSqlValue (ordinal As Integer) As Object

参数

ordinal
Int32 Int32 Int32 Int32

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

返回

表示为 SQL Server 类型的列的值,其形式为 ObjectThe value of the column, expressed as a SQL Server type, as a Object.

异常

ordinal 小于 0 或大于列数(即 FieldCount)。The ordinal is less than 0 or greater than the number of columns (that is, FieldCount).

注解

SQL Server 类型实例为 null 值,并返回 whereIsNull属性为 true。For null values, a SQL Server type instance is returned where the IsNull property is true.

适用于

另请参阅