GetOrdinal Method

AdomdDataReader.GetOrdinal Method (String)

 

Updated: March 10, 2016

Returns the ordinal position of the specified column.

Namespace:   Microsoft.AnalysisServices.AdomdClient
Assembly:  Microsoft.AnalysisServices.AdomdClient (in Microsoft.AnalysisServices.AdomdClient.dll)

public int GetOrdinal(
	string name
)

Parameters

name
Type: System.String

The name of the column to find.

Return Value

Type: System.Int32

An Integer that contains the ordinal position of the specified column.

GetOrdinal performs a case-insensitive lookup.

GetOrdinal is kana-width insensitive.

Because ordinal-based lookups are more efficient than named lookups, it is inefficient to call GetOrdinal within a loop. Save time by calling GetOrdinal once and assigning the results to an integer variable for use within the loop.

Return to top
Show:
© 2016 Microsoft