home *** CD-ROM | disk | FTP | other *** search
-
- 1 Version 4.0 -- 5/1/89 dbordercol
- ______________________________________________________________________
-
- NAME: dbordercol
-
- FUNCTION:
- Return the id of a column appearing in the most recently executed
- query's ORDER BY clause.
-
- SYNTAX:
- int dbordercol(dbproc, order)
-
- DBPROCESS *dbproc;
- int order;
-
-
-
-
-
-
-
-
- dbordercol Version 4.0 -- 5/1/89 2
- ______________________________________________________________________
-
- COMMENTS:
-
- o This routine returns the id of the column that appears in a
- specified location within the ORDER BY clause of a SQL SELECT
- command.
-
- For example, given the SQL statement:
-
- select dept, name, salary from employee
- order by salary, name
-
- the call dbordercol(dbproc, 1) will return 3 since the first
- column named in the ORDER BY clause refers to the third column
- in the query's select-list.
-
- PARAMETERS:
- dbproc - A pointer to the DBPROCESS structure that provides the
-
-
- 3 Version 4.0 -- 5/1/89 dbordercol
- ______________________________________________________________________
- 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.
- order - The id that identifies the particular ORDER BY column of
- interest. The first column named within the ORDER BY clause
- is number 1.
-
- RETURNS:
- The column id (based on the column's position in the select-list)
- for the column in the specified place in the ORDER BY clause. If
- the order is invalid, dbordercol() returns -1.
-
- SEE ALSO:
- DBNUMORDERS
-
-
-
-
-
-