DBNUMORDERS

Description

Return the number of columns specified in a Transact-SQL select statement’s order by clause.

Syntax

int DBNUMORDERS(dbproc)
 
DBPROCESS   *dbproc;

Parameters

dbproc

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.

Returns

The number of order by columns. If there is no order by clause, this routine returns 0. If there is an error, it returns -1.

Usage

Once a select statement has been executed and dbresults has been called to process it, the application can call DBNUMORDERS to find out how many columns were specified in the statement’s order by clause.

See also

dbordercol