SqlDataRecord.GetName(Int32) SqlDataRecord.GetName(Int32) SqlDataRecord.GetName(Int32) SqlDataRecord.GetName(Int32) Method

定义

返回序号自变量指定的列的名称。Returns the name of the column specified by the ordinal argument.

public:
 virtual System::String ^ GetName(int ordinal);
public virtual string GetName (int ordinal);
abstract member GetName : int -> string
override this.GetName : int -> string
Public Overridable Function GetName (ordinal As Integer) As String

参数

ordinal
Int32 Int32 Int32 Int32

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

返回

一个包含列名称的 StringA String containing the column name.

实现

异常

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

适用于