Index: openacs-4/packages/acs-tcl/tcl/00-database-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/Attic/00-database-procs.tcl,v
diff -u -r1.6 -r1.7
--- openacs-4/packages/acs-tcl/tcl/00-database-procs.tcl 3 Sep 2001 18:40:46 -0000 1.6
+++ openacs-4/packages/acs-tcl/tcl/00-database-procs.tcl 16 Sep 2001 13:34:15 -0000 1.7
@@ -566,8 +566,6 @@
transaction_code
will be caught automatically and process control will transfer to error_code
with a variable errmsg
set. The error_code block can then clean up after the error, such as presenting a usable
error message to the user. Following the execution of error_code
the transaction will be aborted.
- Alternatively, a command to continue the transaction db_continue_transaction
can be issued. This
- command will commit any successful database commands when the transaction completes, assuming no further errors are raised.
If you want to explicity abort the transaction, call db_abort_transaction
from within the transaction_code block or the error_code block.
@@ -592,23 +590,6 @@
}
- Example 3:
- In this example, all of the dml statements are executed and committed. The call to db_abort_transaction
- signals that the transaction should be aborted which activates the higher level on_error block. That code
- issues a db_continue_transaction which commits the transaction. Had there not been an on_error block, none
- of the dml statements would have been committed.
-
- db_transaction { - db_dml test {insert into footest values(1)} - db_transaction { - db_dml test {insert into footest values(2) } - db_abort_transaction - } - db_dml test {insert into footest values(3) } - } on_error { - db_continue_transaction - } -} { global db_state @@ -721,7 +702,6 @@ # Good, no error thrown by the on_error block. if [db_abort_transaction_p] { # This means we should abort the transaction. - # Use db_continue_transaction in the on_error block to avoid this. if { $level == 1 } { set db_state(db_abort_p,$dbh) 0 ns_db dml $dbh "abort transaction"