Drop a registered procedure.
RETCODE dbregdrop(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 wishes to drop.
The length of procedure_name, in bytes. If procedure_name is null-terminated, pass namelen as DBNULLTERM.
SUCCEED, DBNOPROC, or FAIL.
dbregdrop drops a registered procedure from Open Server. Because a notification procedure is simply a special type of registered procedure, a notification procedure may also be dropped using dbregdrop.
A DBPROCESS connection can drop any registered procedure defined in Open Server, including procedures created by other DBPROCESS connections and procedures created by other applications. Any mechanism to protect registered procedures must be embodied in the server application.
If the procedure referenced by procedure_name is not defined in Open Server, dbregdrop returns DBNOPROC. An application can use dbreglist to obtain a list of registered procedures currently defined in Open Server.
This is a code fragment that uses dbregdrop:
/*
** The following code fragment illustrates
** dropping a registered procedure.
*/
DBPROCESS *dbproc;
RETCODE ret;
char *procname;
procname = "some_event";
ret = dbregdrop(dbproc, procname, DBNULLTERM);
if (ret == FAIL)
{
fprintf(stderr, "ERROR: dbregdrop() \
failed!!\n");
}
else if (ret == DBNOPROC)
{
fprintf(stderr, "ERROR: procedure %s was not\
registered!\n", procname);
}