dbnumcompute

DB Library for C

DB Library for C

dbnumcompute

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

Syntax

INT dbnumcompute ( PDBPROCESS dbproc );

Arguments

dbproc

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.

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, because 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