Returns the ID of a column appearing in the most recently executed query's ORDER BY clause.
INT dbordercol (
INT order );
Is the DBPROCESS structure that is the handle for a particular workstation or Microsoft® SQL Server™ 2000 process. It contains all the information that DB-Library uses to manage communications and data between the workstation and SQL Server.
Is the ID that identifies the particular ORDER BY column. The first column named within the ORDER BY clause is number 1.
The column ID (based on the column's position in the select list) for the column in the specified place in the ORDER BY clause. If the order is invalid, then -1 is returned.
Call dbordercol after dbresults has returned SUCCEED.
In this example, dbordercol(dbproc, 1) returns 3 since the first column named in the ORDER BY clause refers to the third column in the SELECT statement:
SELECT dept, name, salary FROM employee ORDER BY salary, name