home *** CD-ROM | disk | FTP | other *** search
-
- 1 Version 4.0 -- 5/1/89 dbcolsource
- ______________________________________________________________________
-
- NAME: dbcolsource
-
- FUNCTION:
- Return a pointer to the name of the database column from which
- the specified regular result column was derived.
-
- SYNTAX:
- char *dbcolsource(dbproc, colnum)
-
- DBPROCESS *dbproc;
- int colnum;
-
-
-
-
-
-
-
-
- dbcolsource Version 4.0 -- 5/1/89 2
- ______________________________________________________________________
-
- COMMENTS:
-
- o dbcolsource() is one of the DB-Library browse mode routines.
- It is usable only with results from a browse-mode SELECT (i.e.,
- a SELECT containing the key words FOR BROWSE). See the Intro-
- duction for a detailed discussion of browse mode.
- o dbcolsource() provides an application with information it needs
- to update a database column, based on an ad hoc query. SELECT
- statements may optionally specify header names for regular
- (i.e., non-compute) result columns:
-
- select author = au_lname from authors for browse
-
- When updating a table, you must use the database column name,
- not the header name (in this example, "au_lname", not
- "author"). You can use the dbcolsource() routine to get the
-
-
-
- 3 Version 4.0 -- 5/1/89 dbcolsource
- ______________________________________________________________________
- underlying database column name:
-
- dbcolsource(dbproc, 1)
-
- This call will return a pointer to the string "au_lname".
-
- o dbcolsource() is useful for ad hoc queries. If the query has
- been hardcoded into the program, this routine is obviously
- unnecessary.
- o The application can call dbcolsource() any time after
- dbresults().
-
- o Example 7 in the DB-Library Reference Supplement contains a
- call to dbcolsource().
-
- PARAMETERS:
- dbproc - A pointer to the DBPROCESS structure that provides the
- connection for a particular front-end/SQL Server process. It
-
-
- dbcolsource Version 4.0 -- 5/1/89 4
- ______________________________________________________________________
- contains all the information that DB-Library uses to manage
- communications and data between the front end and SQL Server.
- colnum - The number of the result column of interest. Column
- numbers start at 1.
-
- RETURNS:
- A pointer to a null-terminated column name. This pointer will be
- NULL if the column number is out of range or if the column is the
- result of a SQL expression, such as "max(colname)".
-
- SEE ALSO:
- dbcolbrowse, dbqual, dbtabbrowse, dbtabcount, dbtabname, dbtab-
- source, dbtsnewlen, dbtsnewval, dbtsput
-
-
-
-
-
-
-