Venkat
16th December 2004, 14:20
Hi

Is there a (variable) way to trap this message "transaction is on, can't continue". Based on this i need to set retry points.
db.retry.hit cannot be relied on..

Regards
Venkat

mark_h
16th December 2004, 16:26
Have you tried using error.bypass? This allows you to trap some errors, just not sure about the transaction is on error.

My question is why aren't you closing the transaction before starting the next one? Maybe more info would help people provide suggestions.

Mark

Hitesh Shah
16th December 2004, 17:45
It's programming error. It comes when already a transaction is started by db.retry.point and another transaction istarted without any commit or abort.

In normal main table session standard program starts the transaction just before update.db and releases the in after.update.db.commit .

Venkat
17th December 2004, 05:17
hi,
i have tried error.bypass..i doesn't work..
the function is question is a std baan function called tcedi0051 (baan4a)..called from tcmcs0200
it has a retry point and commit of its own....there are at leaset 200 scripts calling it...
suddenly i found out that some of the scripts are calling this function in their transaction..till date the error did not come bcos of some "if" condition that was bypassed..now this error has cropped and i want to circumvent this..i cannot check the 200 scripts for the db.retry etc...
so i thought...that i wil not set db.retry.point..if a transaction is on....
if baan can give the message..surely there must be a way to tackle it thru code then
rgds
venkat

mark_h
17th December 2004, 21:40
The only way I know to solve this would be to go into each of the scripts and fix it. I can not think of any other way to do this. Of course this is also something I would pass on to Baan support. Sorry, but I do not know of another solution.

Mark

csecgn
17th December 2004, 22:27
Hi venkat,

like Hitesh Shah wrote, transaction is on is a serious error. I don't think there is a way left or rigth. For my experience the only way to avoid this problem is to reorganice your transaction if possible or to use another function (maybe your own version of the include functionality without the EDI include?)

Actual in Baan recursion is not possible (this message I get every time I've forgotten :o For my opinion nested transactions requires recursion).

Regards
csecgn

Hitesh Shah
18th December 2004, 15:03
Venkat ,

Transaction handling is a task of db driver . It maybe tracked by db driver and not standard program . So it may not be possible for u to track the same in program .

wvgenech
20th December 2004, 13:41
The message "transaction is on" means that the program encountered 2 consecutive retry points without intermediate commit.transaction.

If you put a script in the debug mode and let it run. The system will crash on the point where the second transaction is started. This information can be used to see how the script has to be modified.

Best Regards,

Wim

Venkat
21st December 2004, 06:46
Thanks to al the advice u guys gave...
the problem is solved and the way i wanted it too..there is a function in Baan (undocumented) db.transaction.is.on() which will tells whether a transaction is on or not...

Regards
Venkat

priyanka pawar
7th January 2013, 13:31
We faced the same problem, but finally it was resolved when we added commit.transaction() after the db.insert in the DAL Script.

case DAL_NEW:
select tfbed200.ninv
from tfbed200
where tfbed200._index1 = {:tfacp200.ifbp,:tfacp200.ttyp,:tfacp200.ninv,:tfacp200.line,:tfacp200.tdoc,:tfacp200.docn,:tfacp200.lino}
selectdo
selectempty
tfbed200.ttyp = tfacp200.ttyp
tfbed200.ninv = tfacp200.ninv
tfbed200.line = tfacp200.line
tfbed200.tdoc = tfacp200.tdoc
tfbed200.docn = tfacp200.docn
tfbed200.lino = tfacp200.lino
tfbed200.ifbp = tfacp200.ifbp

db.insert(ttfbed200,db.retry)
commit.transaction() | We faced the problem right here
endselect
break

bhushanchanda
8th January 2013, 16:37
Or you can use:

db.insert(table_name,db.retry,elocked)

and also remove db.retry.point()


It's just a trial & error method.

ajitkumar
9th May 2014, 17:37
My program is to delete multiple tables with many records, I have been getting Transaction is on as error msg inspite of that I'm using
db.retry.point()
table
commit.transaction()
how to avoid that error

mark_h
9th May 2014, 18:14
Is it 4c4? Post the code, what kind of session and maybe someone can see what is happening. This can occur if you do not get the retry points lined up with the commit transactions. Plus are you deleting multiple tables or just multiple records in multiple tables? I ask because there are some table commands that could be used.

ashu2814
15th July 2014, 11:47
Can you show the part of script which is doing any update on table ? Can you check whether commit.transaction is properly placed.