SAP jConnect implements batch updates as specified in the JDBC 2.0 API.
The EXECUTE_BATCH_PAST_ERRORS connection property controls how failures are handled in batch execution.
By default, EXECUTE_BATCH_PAST_ERRORS is false and SAP jConnect stops processing after the first failure. BatchUpdateException.getUpdateCounts returns an int[] array with length of M < N, indicating that the first M statements in the batch succeeded, that the M+1 statement failed, and M+2..N statements were not executed. "N" represents the total statements in the batch.
When EXECUTE_BATCH_PAST_ERRORS is true, SAP jConnect continues processing in the presence of nonfatal failures. BatchUpdateException.getUpdateCounts returns an int[] array with length of N, where "N" represents the total statements in the batch. Examine the individual update counts to determine execution status of each statement.
To call stored procedures in batch (unchained) mode, you must create the stored procedure in unchained mode.
If SAP Adaptive Server encounters a fatal error during batch execution, BatchUpdateException.getUpdateCounts returns only an int[ ] length of zero. The entire transaction is rolled back if a fatal error is encountered, resulting in zero successful rows.
Batch updates in databases that do not support batch updates: SAP jConnect carries out batch updates in an executeUpdate loop even if your database does not support batch updates. This allows you to use the same batch code, regardless of the database to which you are pointing.
For details on batch updates, see the JDBC API documentation.