Return the id of a column appearing in the most recently executed query’s order by clause.
int dbordercol(dbproc, order) DBPROCESS *dbproc; int order;
A pointer to the DBPROCESS structure that provides the connection for a particular front-end/server process. It contains all the information that DB-Library uses to manage communications and data between the front end and server.
The id that identifies the particular order by column of interest. 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, dbordercol returns -1.
This routine returns the id of the column that appears in a specified location within the order by clause of a SQL select command.
For example, in given the SQL statement, the call dbordercol(dbproc, 1) will return 3 since the first column named in the order by clause refers to the third column in the query’s select list:
select dept, name, salary from employee
order by salary, name