March 2012
Intermediate to advanced
442 pages
9h 31m
English
JDBC drivers available in DB2 provide the setSavepoint() method to create a savepoint. In this recipe, we will use savepoints in a JDBC application.
TEST_SVPT created in the previous example. The following command can be used to create it:CREATE TABLE TEST_SVPT (
EMPNO INTEGER,
EMPNAME VARCHAR(20),
MGRNO INTEGER);
Connection.setSavepoint(String name)Connection.rollback(Savepoint savepointName)Connection.releaseSavepoint(Savepoint savepointName)In this example, we will create a transaction having multiple savepoints and we will see how to use them.
Read now
Unlock full access