dbqual

Description

Return a pointer to a where clause suitable for use in updating the current row in a browsable table.

Syntax

char *dbqual(dbproc, tabnum, tabname)
 
DBPROCESS     *dbproc;
int                         tabnum;
char                    *tabname;

Parameters

dbproc

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.

tabnum

The number of the table of interest, as specified in the select statement’s from clause. Table numbers start at 1. If tabnum is -1, the tabname parameter will be used to identify the table.

tabname

A pointer to the null-terminated name of a table specified in the select statement’s from clause. tabname is ignored unless tabnum is passed as -1.

Returns

A pointer to a null-terminated where clause for the current row in the specified table. This buffer is dynamically allocated, and it is the application’s responsibility to free it using dbfreequal.

dbqual will return a NULL pointer if the specified table is not browsable. For a table to be “browsable,” it must have a unique index and a timestamp column.

dbqual will also return a NULL pointer if the preceding select did not include the for browse option.

Usage

See also

dbcolbrowse, dbcolsource, dbfreequal, dbtabbrowse, dbtabcount, dbtabname, dbtabsource, dbtsnewlen, dbtsnewval, dbtsput