GetOrdinal(string) Method

Syntax:

public int GetOrdinal(string name)

Description:

Gets the column ordinal given the name of the column

Parameters:

name

Type: System.String

The name of the column

Return Value:

Type: System.Int32

The zero-base column ordinal

Exceptions:

Exception Condition
InvalidOperationException The RdmDataReader is closed.
IndexOutOfRangeException The specified name was not a valid column name

Reference:

For more information, reference MSDN documentation for: System.Data.Common.DbDataReader.GetOrdinal