dbnumorders

Returns the number of columns specified in a Transact-SQL SELECT statement’s ORDER BY clause.

Syntax

INT dbnumorders ( PDBPROCESS dbproc );

Arguments
dbproc
Is the DBPROCESS structure that is the handle for a particular workstation/ Microsoft® SQL Server™ process. It contains all the information that DB-Library uses to manage communications and data between the workstation and SQL Server.
Returns

The number of ORDER BY columns. If there is no ORDER BY clause, dbnumorders returns 0. If there is an error, dbnumorders returns -1.

Remarks

After a SELECT statement has been executed and dbresults has been called to process it, you can call dbnumorders to find out how many columns were specified in the current statement’s ORDER BY clause. Call dbnumorders after dbresults has returned SUCCEED.

See Also
dbordercol dbresults

  


(c) 1988-98 Microsoft Corporation. All Rights Reserved.