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.21 -r1.22 --- openacs-4/packages/acs-tcl/tcl/00-database-procs.tcl 19 Dec 2002 16:09:50 -0000 1.21 +++ openacs-4/packages/acs-tcl/tcl/00-database-procs.tcl 14 Jan 2003 13:34:23 -0000 1.22 @@ -441,7 +441,6 @@ -local:boolean -append:boolean {-extend {}} - {-upvar_level 1} var_name statement_name sql @@ -472,9 +471,8 @@
If the -local
is passed, the variables defined
by db_multirow will be set locally (useful if you're compiling dynamic templates
- in a function or similar situations). By default the multirow will be set
- one level up but you can specify the number of levels up you want it set with the
- upvar_level switch.
+ in a function or similar situations).
+
You may supply a code block, which will be executed for each row in
@@ -528,7 +526,7 @@
set full_statement_name [db_qd_get_fullname $statement_name]
if { $local_p } {
- set level_up $upvar_level
+ set level_up 1
} else {
set level_up \#[template::adp_level]
}
@@ -736,7 +734,7 @@
ad_proc db_transaction { transaction_code args } {
- Usage: db_transaction code_block [ on_error { error_code_block } ]
+ Usage: db_transaction transaction_code [ on_error { error_code_block } ]
Executes transaction_code with transactional semantics. This means that either all of the database commands
within transaction_code are committed to the database or none of them are. Multiple db_transaction
s may be
@@ -755,7 +753,7 @@
db_transaction {
db_dml test "nonsense"
} on_error {
- ad_return_complaint "The DML failed."
+ ad_return_error "Error in blah/foo/bar" "The error was: $errmsg"
}