Return the name of a table based on its number.
char *dbtabname(dbproc, tabnum) DBPROCESS *dbproc; int tabnum;
A pointer to the DBPROCESS structure that provides the connection for a particular front-end/server process. It contains all the information that DB-Library uses to manage communications and data between the front end and server.
The number of the table of interest. Table numbers start with 1. Use dbtabcount to find out the total number of tables involved in a particular query.
A pointer to the null-terminated name of the specified table. This pointer will be NULL if the table number is out of range or if the specified table is a server work table. See the dbtabcount reference page for a description of work tables.
dbtabname is one of the DB-Library browse-mode routines. It is usable only with results from a browse-mode select (that is, a select containing the key words for browse). See “Browse mode” for a detailed discussion of browse mode.
A select query can generate a set of result rows whose columns are derived from several database tables. dbtabname provides a way for an application to determine the name of each table involved in an ad hoc query. If the query has been hard-coded into the program, this routine obviously is unnecessary.
The application can call dbtabname anytime after dbresults.
The sample program example7.c contains a call to dbtabname.
dbcolbrowse, dbcolsource, dbqual, dbtabbrowse, dbtabcount, dbtabsource, dbtsnewlen, dbtsnewval, dbtsput