1 Version 4.0 -- 5/1/89 dbnumalts
______________________________________________________________________
NAME: dbnumalts
FUNCTION:
Return the number of columns in a compute row.
SYNTAX:
int dbnumalts(dbproc, computeid)
DBPROCESS *dbproc;
int computeid;
COMMENTS:
dbnumalts Version 4.0 -- 5/1/89 2
______________________________________________________________________
o dbnumalts() returns the number of columns in a compute row.
The application can call this routine after dbresults() returns
SUCCEED. For example, given the SQL statement:
select dept, year, sales from employee
order by dept, year
compute avg(sales), min(sales), max(sales) by dept
the call dbnumalts(dbproc, 1) will return 3.
PARAMETERS:
dbproc - A pointer to the DBPROCESS structure that provides the
connection for a particular front-end/SQL Server process. It
contains all the information that DB-Library uses to manage
communications and data between the front end and SQL Server.
computeid - The id that identifies the particular compute row of
interest. A SQL SELECT statement may have multiple COMPUTE
3 Version 4.0 -- 5/1/89 dbnumalts
______________________________________________________________________
clauses, each of which returns a separate compute row. The
computeid corresponding to the first COMPUTE clause in a
SELECT is 1. The computeid is returned by dbnextrow() or
dbgetrow().
RETURNS:
The number of columns for the particular computeid. dbnumalts()
returns -1 if computeid is invalid.
SEE ALSO:
dbadata, dbadlen, dbaltlen, dbalttype, dbgetrow, dbnextrow,
dbnumcols