Remove a procedure from the list of registered procedures.
sp_regdrop proc_name
The name of the registered procedure to remove.
1>execute stock...sp_regdrop pricechange
2>go
In this example, a client logged into Adaptive Server Enterprise with isql uses a server-to-server remote procedure call to execute sp_regdrop on the stock Open Server application. The procedure deletes the pricechange registered procedure from stock.
dbrpcinit(dbproc, "sp_regdrop", NULL);
dbrpcparam(dbproc, "proc_name", NULL, SYBCHAR, -1,
11, "pricechange");
dbrpcsend(dbproc);
This example uses the DB-Library RPC routines to execute sp_regdrop with a single parameter “pricechange”. This causes the sp_regdrop system procedure to delete the pricechange registered procedure from Open Server.
When a procedure is unregistered, clients that have pending notification requests receive a message to indicate that the procedure is no longer registered.
sp_regdrop executes when a client executes dbnpdrop. The SRV_C_PROCEXEC callback handler can use srv_rpcname to find that sp_regdrop is executing. Then it can obtain a pointer to parameter number 1, proc_name, using srv_bind and srv_xferdata.
proc_name has been unregistered.
The procedure specified with the proc_name parameter was successfully unregistered.
proc_name is not a registered procedure.
The procedure specified with the proc_name parameter was not registered with Open Server.
Unable to unregister proc_name.
Open Server was unable to unregister the procedure for some other reason.