SqlRpcExec%

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

Syntax

SqlRpcExec% ( sqlconn% )

where

sqlconn%
A SQL Server connection. The value of sqlconn% is returned by SqlOpen%.

Returns

succeed (1) or fail (0).

Remarks

After initializing and setting up each stored procedure using SqlRpcInit% and SqlRpcParam%, call SqlRpcExec% to execute the stored procedure or batch of stored procedures on SQL Server. Then call SqlOk% before processing the stored procedure results. SqlRpcExec% can be faster than SqlRpcSend% on some networks. For more information about executing stored procedures using DB-Library functions, see "SqlRpcInit%."

Note This function is one of the five (SqlNextRow%, SqlResults%, SqlRpcExec%, SqlExec%, SqlOk%) 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 SqlRpcSend% and SqlOk%, or set the DB-Library timeout to regain control periodically.

See Also

SqlNextRow%, SqlResults%, SqlRetData$, SqlRetStatus&, SqlRpcInit%, SqlRpcParam%