Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 11.0.0 » SQL Anywhere Server - Programming » SQL Anywhere Data Access APIs » SQL Anywhere .NET 2.0 API Reference » iAnywhere.Data.SQLAnywhere namespace (.NET 2.0) » SADataReader class

 

GetOrdinal method

Returns the column ordinal, given the column name.

Syntax
Visual Basic

Public Overrides Function GetOrdinal( _
   ByVal name As String _
) As Integer
C#

public override int GetOrdinal(
   string  name
);
Parameters
  • name   The column name.

Return value

The zero-based column ordinal.

Remarks

GetOrdinal performs a case-sensitive lookup first. If it fails, a second case-insensitive search is made.

GetOrdinal is Japanese kana-width insensitive.

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

See also