Batching Stored Procedure Calls

ODBC and SQL Server

ODBC and SQL Server

Batching Stored Procedure Calls

The Microsoft® SQL Server™ ODBC driver automatically batches stored procedure calls to the server when appropriate. The driver only does this when the ODBC CALL escape sequence is used; it does not do this for the Transact-SQL EXECUTE statement. Batching stored procedure calls can reduce the number of roundtrips to the server and significantly increase performance.

The driver batches procedure calls to the server when you execute a batch containing multiple ODBC CALL escape sequences. It also batches procedure calls when bound parameter arrays are used with an ODBC CALL escape sequence. For example, if you use either row-wise or column-wise parameter binding to bind an array with five elements to the parameters of an ODBC CALL SQL statement, then when SQLExecute or SQLExecDirect is called, the driver sends a single batch with five procedure calls to the server.

To call remote procedures