ODBC Data Batching without Binding Parameter Arrays

When the same SQL statement is executed for different parameter values, client applications normally bind parameter arrays and execute each set of parameters using SQLExecute, SQLExecuteDirect, and SQLBulkOperations.

In binding arrays to SQL parameters, memory for the array is allocated, and all data is copied to the array before the SQL statement is executed. This can lead to inefficient use of memory and resources when processing high volume of transactions.

In Adaptive Server Enterprise ODBC Driver 15.7, client applications can use SQLExecute to send parameters in batches to Adaptive Server, without binding the parameters as arrays. SQLExecute returns SQL_BATCH_EXECUTING until the last batch of parameters has been sent and processed. It returns the status of the execution after the final batch of parameters has been processed.

A call to SQLRowCount is valid only after the final SQLExecute statement has completed.