Return a list of registered procedures that a DBPROCESS is watching for.
RETCODE dbregwatchlist(dbproc) DBPROCESS *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.
SUCCEED or FAIL.
dbregwatchlist returns a list of registered procedures that a DBPROCESS connection is watching for. Because a notification procedure is simply a special type of registered procedure, the list returned by dbregwatchlist will include notification procedures.
The list of registered procedures is returned as rows that an application must explicitly process after calling dbregwatchlist. Each row represents the name of a single registered procedure for which the DBPROCESS has requested notification. A row contains a single column of type SYBVARCHAR.
The following code fragment illustrates how dbregwatchlist might be used in an application:
DBPROCESS *dbproc;
DBCHAR *procedurename;
DBINT ret;
/* Request the list of procedures */
if( (ret = dbregwatchlist(dbproc)) == FAIL)
{
/* Handle failure here */
}
dbresults(dbproc);
while( dbnextrow(dbproc) != NO_MORE_ROWS )
{
procedurename = (DBCHAR *)dbdata(dbproc, 1);
procedurename[dbdatlen(dbproc, 1)] = ’\0’;
fprintf(stdout, "we’re waiting for \
procedure ’%s’.\n", procedurename);
}
/* All done */