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/ 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 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

  


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