SAVEPOINT setting:
I'm uncomfortable referring to the SQL standard for this question, because
I'm not completely sure that it is specified adequately/properly, but that
being said, the question is: What happens when Connection.setSavepoint("foo"); is invoked outside the bounds of atransaction?
For the simplest example,
Connection conn = DriverManager.getConnection(...);
conn.setAutoCommit(false); // required for Savepoint use.
conn.setSavepoint("foo");
All documentation I've scanned both in JDBC and the SQL standard implies a transaction has already started (e.g., the SQL standard includes phrases like "within the current SQL-transaction", and the JDBC standard says "sets a savepoint within the current transaction." But, neither says what happens when there is no current transaction, and (per the SQL standard) the SAVEPOINT statement doesn't itself start a transaction, so I can't get around the problem that way....
###@###.### 2004-02-02
I'm uncomfortable referring to the SQL standard for this question, because
I'm not completely sure that it is specified adequately/properly, but that
being said, the question is: What happens when Connection.setSavepoint("foo"); is invoked outside the bounds of atransaction?
For the simplest example,
Connection conn = DriverManager.getConnection(...);
conn.setAutoCommit(false); // required for Savepoint use.
conn.setSavepoint("foo");
All documentation I've scanned both in JDBC and the SQL standard implies a transaction has already started (e.g., the SQL standard includes phrases like "within the current SQL-transaction", and the JDBC standard says "sets a savepoint within the current transaction." But, neither says what happens when there is no current transaction, and (per the SQL standard) the SAVEPOINT statement doesn't itself start a transaction, so I can't get around the problem that way....
###@###.### 2004-02-02