Hitachi

Hitachi Advanced Database Application Development Guide


8.3.10 executeLargeBatch()

Organization of this subsection

(1) Function

This method executes the SQL statements registered in a batch and returns an array of update counts in long format.

This method clears the SQL statements in the batch after executing all of them. All SQL statements will be cleared even if an error occurs during processing.

If there is a possibility that the update count might exceed Integer.MAX_VALUE, use the executeLargeBatch method instead of executeBatch. If you use the executeBatch method, it will return 0 if the update count exceeds Integer.MAX_VALUE.

(2) Format

public synchronized long[] executeLargeBatch() throws SQLException

(3) Arguments

None.

(4) Return value

This method returns a long array of the numbers of updated rows for each of the executed SQL statements. The elements of the array are in the order in which the SQL statements are registered in the batch. If there are no SQL statements registered in the batch or the first SQL statement in the batch results in an error, the method returns an array containing zero elements.

(5) Exceptions

For details about exceptions, see (5) Exceptions in 8.3.9 executeBatch().