home *** CD-ROM | disk | FTP | other *** search
/ NeXTSTEP 3.3 (Developer) / NeXT_Developer-3.3.iso / usr / sybase / doc / dbnumalts.man < prev    next >
Encoding:
Text File  |  1993-04-22  |  2.0 KB  |  67 lines

  1.  
  2.   1                       Version 4.0 -- 5/1/89                dbnumalts
  3.   ______________________________________________________________________
  4.  
  5.   NAME:  dbnumalts
  6.  
  7.   FUNCTION:
  8.        Return the number of columns in a compute row.
  9.  
  10.   SYNTAX:
  11.        int dbnumalts(dbproc, computeid)
  12.  
  13.        DBPROCESS *dbproc;
  14.        int       computeid;
  15.  
  16.   COMMENTS:
  17.  
  18.  
  19.  
  20.  
  21.  
  22.  
  23.  
  24.   dbnumalts               Version 4.0 -- 5/1/89                        2
  25.   ______________________________________________________________________
  26.  
  27.        o dbnumalts() returns the number of columns  in  a  compute  row.
  28.          The application can call this routine after dbresults() returns
  29.          SUCCEED.  For example, given the SQL statement:
  30.  
  31.               select dept, year, sales from employee
  32.                 order by dept, year
  33.                 compute avg(sales), min(sales), max(sales) by dept
  34.  
  35.          the call dbnumalts(dbproc, 1) will return 3.
  36.  
  37.   PARAMETERS:
  38.        dbproc -  A pointer to the DBPROCESS structure that provides  the
  39.            connection for a particular front-end/SQL Server process.  It
  40.            contains all the information that DB-Library uses  to  manage
  41.            communications and data between the front end and SQL Server.
  42.        computeid -  The id that identifies the particular compute row of
  43.            interest.   A  SQL SELECT statement may have multiple COMPUTE
  44.  
  45.  
  46.   3                       Version 4.0 -- 5/1/89                dbnumalts
  47.   ______________________________________________________________________
  48.            clauses, each of which returns a separate compute  row.   The
  49.            computeid  corresponding  to  the  first  COMPUTE clause in a
  50.            SELECT is 1.  The computeid is  returned  by  dbnextrow()  or
  51.            dbgetrow().
  52.  
  53.   RETURNS:
  54.        The number of columns for the particular computeid.   dbnumalts()
  55.        returns -1 if computeid is invalid.
  56.  
  57.   SEE ALSO:
  58.        dbadata,  dbadlen,  dbaltlen,  dbalttype,  dbgetrow,   dbnextrow,
  59.        dbnumcols
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.