DB2 Version 9.7 for Linux, UNIX, and Windows

DBBatchUpdateException interface

The com.ibm.db2.jcc.DBBatchUpdateException interface is used for retrieving error information about batch execution of statements that return automatically generated keys.

DBBatchUpdateException methods

The following methods are defined only for the IBM® Data Server Driver for JDBC and SQLJ.

getDBGeneratedKeys
Format:
public java.sql.ResultSet[] getDBGeneratedKeys()
  throws java.sql.SQLException

Retrieves automatically generated keys that were created when INSERT statements were executed in a batch. Each ResultSet object that is returned contains the automatically generated keys for a single statement in the batch. ResultSet objects that are null correspond to failed statements.