Methods for the Statement and PreparedStatement Classes
Go Up to Batch Updates
The following methods have been added to both the Statement and the PreparedStatement classes. The methods listed below now work according to the JDBC specifications.
| Method | Functionality |
|---|---|
|
void Statement.addBatch(String sql) |
Adds sql to the current list of commands. |
|
void Statement.clearBatch() |
Empties the list of commands for the current statement object. |
|
int[] Statement.executeBatch() throws |
Submits the list of commands for this statement’s objects to the database for execution as a unit. The returned integer array contains the update counts for each of the SQL commands in the list. |
|
void PreparedStatement.addBatch() |
Adds a set of parameters to the list of commands for the current |