| java.lang.Object java.lang.Throwable java.lang.Exception java.sql.SQLException java.sql.BatchUpdateException
BatchUpdateException | public class BatchUpdateException extends SQLException implements Serializable(Code) | | An exception thrown if a problem occurs during a batch update operation.
A BatchUpdateException provides additional information about the problem that
occurred, compared with a standard SQLException. It supplies update counts
for successful commands that executed within the batch update, but before the
exception was encountered.
The element order in the array of update counts matches the order that the
commands were added to the batch operation.
Once a batch update command fails and a BatchUpdateException is thrown, the
JDBC driver may continue processing the remaining commands in the batch. If
the driver does process more commands after the problem occurs, the array
returned by BatchUpdateException.getUpdateCounts has an element for every
command in the batch, not only those that executed successfully. In this
case, the array element for any command which encountered a problem is set to
Statement.EXECUTE_FAILED.
|
Constructor Summary | |
public | BatchUpdateException() Creates a BatchUpdateException with the Reason, SQLState, and Update
Counts set to null and a Vendor Code of 0. | public | BatchUpdateException(int[] updateCounts) Creates a BatchUpdateException with the Update Counts set to the supplied
value and the Reason, SQLState set to null and a Vendor Code of 0. | public | BatchUpdateException(String reason, int[] updateCounts) Creates a BatchUpdateException with the Update Counts set to the supplied
value, the Reason set to the supplied value and SQLState set to null and
a Vendor Code of 0. | public | BatchUpdateException(String reason, String SQLState, int[] updateCounts) Creates a BatchUpdateException with the Update Counts set to the supplied
value, the Reason set to the supplied value, the SQLState initialized to
the supplied value and the Vendor Code initialized to 0. | public | BatchUpdateException(String reason, String SQLState, int vendorCode, int[] updateCounts) Creates a BatchUpdateException with the Update Counts set to the supplied
value, the Reason set to the supplied value, the SQLState initialized to
the supplied value and the Vendor Code set to the supplied value. |
Method Summary | |
public int[] | getUpdateCounts() Gets the Update Counts array.
If a batch update command fails and a BatchUpdateException is thrown, the
JDBC driver may continue processing the remaining commands in the batch.
If the driver does process more commands after the problem occurs, the
array returned by BatchUpdateException.getUpdateCounts has
an element for every command in the batch, not only those that executed
successfully. |
BatchUpdateException | public BatchUpdateException()(Code) | | Creates a BatchUpdateException with the Reason, SQLState, and Update
Counts set to null and a Vendor Code of 0.
|
BatchUpdateException | public BatchUpdateException(int[] updateCounts)(Code) | | Creates a BatchUpdateException with the Update Counts set to the supplied
value and the Reason, SQLState set to null and a Vendor Code of 0.
Parameters: updateCounts - the array of Update Counts to use in initialization |
BatchUpdateException | public BatchUpdateException(String reason, int[] updateCounts)(Code) | | Creates a BatchUpdateException with the Update Counts set to the supplied
value, the Reason set to the supplied value and SQLState set to null and
a Vendor Code of 0.
Parameters: reason - the initialization value for Reason Parameters: updateCounts - the array of Update Counts to set |
BatchUpdateException | public BatchUpdateException(String reason, String SQLState, int[] updateCounts)(Code) | | Creates a BatchUpdateException with the Update Counts set to the supplied
value, the Reason set to the supplied value, the SQLState initialized to
the supplied value and the Vendor Code initialized to 0.
Parameters: reason - the value to use for the Reason Parameters: SQLState - the X/OPEN value to use for the SQLState Parameters: updateCounts - the array of Update Counts to set |
BatchUpdateException | public BatchUpdateException(String reason, String SQLState, int vendorCode, int[] updateCounts)(Code) | | Creates a BatchUpdateException with the Update Counts set to the supplied
value, the Reason set to the supplied value, the SQLState initialized to
the supplied value and the Vendor Code set to the supplied value.
Parameters: reason - the value to use for the Reason Parameters: SQLState - the X/OPEN value to use for the SQLState Parameters: vendorCode - the value to use for the vendor error code Parameters: updateCounts - the array of Update Counts to set |
getUpdateCounts | public int[] getUpdateCounts()(Code) | | Gets the Update Counts array.
If a batch update command fails and a BatchUpdateException is thrown, the
JDBC driver may continue processing the remaining commands in the batch.
If the driver does process more commands after the problem occurs, the
array returned by BatchUpdateException.getUpdateCounts has
an element for every command in the batch, not only those that executed
successfully. In this case, the array element for any command which
encountered a problem is set to Statement.EXECUTE_FAILED.
an array that contains the successful update counts, before thisexception. Alternatively, if the driver continues to processcommands following an error, one of these listed items for everycommand the batch contains: - an count of the updates
Statement.SUCCESS_NO_INFO indicating that thecommand completed successfully, but the amount of altered rows isnot known.Statement.EXECUTE_FAILED indicating that thecommand was unsuccessful.
|
|
|