IBM DB2 Manual page 324

Table of Contents

Advertisement

UNLIMITED_BATCH
Constructors:
ExecutionContext
Methods
cancel
execute
executeBatch
308
Application Programming Guide and Reference for Java
public static final int QUERY_COUNT
A constant that can be passed to the setBatchLimit method. It indicates that the
previous execution produced a result set.
Format:
public static final int UNLIMITED_BATCH
A constant that can be returned from the getUpdateCount method. It indicates
that statements should continue to be added to a statement batch, regardless of
the batch size.
Format:
public ExecutionContext()
Creates an ExecutionContext instance.
Format:
public void cancel() throws SQLException
Cancels an SQL operation that is currently being executed by a thread that
uses the execution context object. If there is a pending statement batch on the
execution context object, the statement batch is canceled and cleared.
The cancel method throws an SQLException if the statement cannot be
canceled.
Format:
public boolean execute ( ) throws SQLException
This method is used by code that is generated by the SQLJ translator. It is not
intended for direct use by application programs.
Format:
public synchronized int[] executeBatch() throws SQLException
Executes the pending statement batch and returns an array of update counts. If
no pending statement batch exists, null is returned. When this method is
called, the statement batch is cleared, even if the call results in an exception.
Each element in the returned array can be one of the following values:
-2 This value indicates that the SQL statement executed successfully, but the
number of rows that were updated could not be determined.
-3 This value indicates that the SQL statement failed.
Other integer
This value is the number of rows that were updated by the statement.
The executeBatch method throws an SQLException if a database error occurs
while the statement batch executes.

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents