> addBatch
> public void addBatch()
>               throws SQLExceptionAdds a set of parameters to this
PreparedStatement object's batch of commands.
> Throws:
> SQLException - if a database access error occurs
> Since:
> 1.2
> See Also:
> Statement.addBatch(java.lang.String), What Is in the JDBC 2.0 API
>
> might try to use this on the platform defaultimpl instead of the oracle
specific one.

In the code I sent, the platform defaultimpl is a no-op. It just returns the
given PreparedStatement back to the caller without modification.

But instead of a no-op, we could use the addBatch() function. Makes sense.
This should work for JDBC 2.0 compliant drivers.

Then the code would count how many calls to addBatch() have been made for
the given PreparedStatement and call executeBatch() when:
    1. (count == batchSize) or
    2. It's time to commit the PB transaction and ((count % batchSize) !=
0).

When executeBatch() is called the code would do the optimistic locking/rows
updated check.

richard


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to