dbnumcompute

Returns the number of COMPUTE clauses in the current set of results.

Syntax

INT dbnumcompute ( PDBPROCESS dbproc );

where

dbproc
Is the DBPROCESS structure that is the handle for a particular workstation/ 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 COMPUTE clauses in the current set of results.

Remarks

Call this function after dbresults has returned SUCCEED.

Example

In this example, dbnumcompute (dbproc) returns 2, since there are two COMPUTE clauses in the SELECT statement:

select dept, name from employee
order by dept, name
compute count(name) by dept
compute count(name)

See Also

dbnumalts, dbresults