dbtabname

Returns the name of a table based on its number.

Syntax

LPCSTR dbtabname (
PDBPROCESS dbproc,
INT tabnum );

Arguments
dbproc
Is the DBPROCESS structure that is the handle for a particular workstation/ Microsoft® SQL Server™ process. It contains all the information that DB-Library uses to manage communications and data between the workstation and SQL Server.
tabnum
Is the number of the table. Table numbers start with 1. Use dbtabcount to find out the total number of tables involved in a particular statement.
Returns

A pointer to the null-terminated name of the specified table. This pointer is NULL if the table number is out of range or if the specified table is a SQL Server work table. For a description of work tables, see dbtabcount.

Remarks

dbtabname is one of the DB-Library browse-mode functions. For a detailed discussion of browse mode, see Browse Mode in Programming DB-Library for C.

A SELECT statement can generate a set of result rows whose columns are derived from several database tables. The database tables are specified by the FROM clause. 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 function is unnecessary.

dbtabname can be called any time after dbresults.

See Also
dbcolbrowse dbtabbrowse
dbcolsource dbtsnewlen
dbqual dbtsnewval
dbresults dbtsput

  


(c) 1988-98 Microsoft Corporation. All Rights Reserved.