On 21 Feb, 12:49, Serge Rielau <srie...@ca.ibm.comwrote:
>
Not clear I understand your question...
Are you asking whether you can submit a BEGIN ATOMIC ... END from JDBC?
The answer to that AFAIk is yes. Use the same API you use for e.g. UPDATE.
Hi Serge,
Yes: I am asking whether I can submit a BEGIN ATOMIC ... END over
JDBC. There are advantages from an application-packaging point-of-view
if you can keep this sort of logic within the Java application itself,
rather than installing the same logic in the DB as a stored procedure
or function - both from a deployment and a rollback perspective.
My problem is that the simple examples I've tried have invariably all
complained about the syntax - so I wondered whether anyone knew the
exact Java statement type (eg: Statement, CallableStatement,
PreparedStatement) to use, and also the associated syntax (hence the
quick example in my first post of how the syntax for a
CallableStatement varies from a Statement or PreparedStatement).
Cheers
Michael