dbrpcexec

Executes a single stored procedure, a single remote stored procedure, or batch of stored procedures and/or remote stored procedures on SQL Server.

Syntax

RETCODE dbrpcexec ( PDBPROCESS pdbproc );

where

pdbproc
The DBPROCESS structure that is the handle for a particular workstation/SQL Server process. It contains all the information that DB-Library uses to manage communications and data between the workstation and SQL Server.

Returns

SUCCEED or FAIL.

Remarks

After initializing and setting up each stored procedure using dbrpcinit and dbrpcparam, call dbrpcexec to execute the stored procedure or batch of stored procedures on SQL Server. Then call dbsqlok before processing the stored procedure results. dbrpcexec can be faster than dbrpcsend on some networks. For more information about executing stored procedures using DB-Library functions, see "dbrpcinit."

Note This function is one of the five (dbnextrow, dbresults, dbrpcexec, dbsqlexec, dbsqlok) that do not return control to the application until after the server sends the required response. The application can be blocked for a considerable time if the server is waiting for a lock or is processing a large sort. If this is unacceptable, use dbrpcsend and dbsqlok, or set the DB-Library timeout to regain control periodically.

See Also

dbnextrow, dbresults, dbretdata, dbretstatus, dbrpcinit, dbrpcparam, dbsqlok