lli-baan
19th August 2002, 15:31
I've made a script and if this script runs I become the error message "Transaction is on! Can't continue."
Can anybody help me, how I find the problem.
The Debugger is no help, becuase the debugger is on status "Running" when the message appears!!!
lbencic
19th August 2002, 17:09
Transaction is on means that you are in trouble with db.retries and commit.transactions. Usually, you are trying to set a db.retry.point() when another transaction has done a database action with a db.retry and has not been committed yet.
The transaction may be from the standard program in a main table maintenance session: ie, you may be trying to do something yourself when the standard program has a lock on the main table. In that case, changing sections around and reading up on what is locked when can help.
Hope that helps. Post more detail on the code if you are still in error.
nick_rogers
19th August 2002, 17:42
Only one rertry point can be active at a time.
If your session has a main table then the retry point is set by the standard program - so do not set another retry point or commit the transaction youreself ( the only exception is after.write / after.rewrite / after.delete - as the commit/retry is finnished by the standard program).
examples:
before .write:
update.custom.table()
function update.custom.table()cntion
{
|sql code with no retry point set and no commit performed.
}
after.delete:
delete.from.custom.table()
function delete.from.custom.table()
{
|sql code with a retry point set and commit performed.
}
lli-baan
20th August 2002, 09:34
Thanx!
I try it!
NOW IT WORKS!!!