dbrpcexec

DB Library for C

DB Library for C

dbrpcexec

Executes a single stored procedure, a single remote stored procedure, or batch of stored procedures or remote stored procedures on Microsoft® SQL Server™ 2000.

Syntax

RETCODE dbrpcexec ( PDBPROCESS pdbproc );

Arguments

pdbproc

Is the DBPROCESS structure that is the handle for a particular workstation or SQL Server 2000 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, and 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 time-out to regain control periodically.

See Also

dbnextrow

dbretstatus

dbresults

dbrpcparam

dbretdata

dbsqlok