Cancel a request to be notified when a registered procedure executes.
RETCODE dbregnowatch(dbproc, procedure_name, namelen) DBPROCESS *dbproc; DBCHAR *procedure_name; DBSMALLINT namelen;
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/C uses to manage communications and data between the front end and the server.
A pointer to the name of the registered procedure that the DBPROCESS connection is no longer interested in.
The length of procedure_name, in bytes. If procedure_name is null-terminated, pass namelen as DBNULLTERM.
SUCCEED, DBNOPROC, or FAIL.
dbregnowatch cancels a DBPROCESS connection’s request to be notified when a registered procedure executes. Because a notification procedure is simply a special type of registered procedure, dbregnowatch also cancels a DBPROCESS connection’s request to be notified when a notification procedure executes.
It is meaningful to call dbregnowatch only if the DBPROCESS connection has previously requested an asynchronous notification using dbregwatch.
If the procedure referenced by procedure_name is not defined in Open Server, dbregnowatch returns DBNOPROC. An application can obtain a list of procedures currently registered in Open Server using dbreglist.
An application can obtain a list of registered procedures it is watching for through dbregwatchlist.
This is an example of canceling a request to be notified:
DBPROCESS *dbproc;
DBINT ret;
/*
** Inform the server that we no longer wish to
** be notified when "price_change" executes:
*/
ret = dbregnowatch (dbproc, "price_change",
DBNULLTERM);
if (ret == DBNOPROC)
{
/* The registered procedure must not exist */
fprintf(stderr, "ERROR: price_change \
doesn’t exist!\n");
}