I try to insert a couple of records into the db, some of which might fail. Each record has it's own db_transaction for first creating an acs_object and then inserting other related data.
However, once one transaction fails, all the following transaction fail as well with no error message. I seems as if db_transaction sets a flag somewhere on failure and does not reset it for a new transaction.
I am using openacs 5 here, using the -dbn switch. Don't know if that does anything to it or not.
db_foreach -dbn one_db ... {
db_transaction -dbn other_db ... {
db_dml -dbn other_db do_something ...
} on_error {
ns_log notice "$errmsg"
}
}
something like that.