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

SQL Anywhere 11.0.0 » UltraLite - .NET Programming » UltraLite .NET 2.0 API Reference » ULDataReader class

 

GetOrdinal method

Returns the column ID of the named column.

Syntax
Visual Basic

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

public override int GetOrdinal(
   string  columnName
);
Parameters
  • columnName¬†¬† The name of the column.

Return value

The column ID of the named column.

Remarks

Column IDs range from 0 to ULDataReader.FieldCount-1, inclusively.

Note that in result sets, not all columns have names and not all column names are unique. If you are not using aliases, the name of a non-computed column is prefixed with the name of the table the column is from. For example, MyTable.ID is the name of the only column in the result set for the query "SELECT ID FROM MyTable".

Column IDs and counts may change during a schema upgrade. To correctly identify a column, access it by name or refresh the cached IDs and counts after a schema upgrade.

This method is identical to the ULCursorSchema.GetColumnID method.

See also