Sukhdev
9th September 2002, 10:32
I'm using DB.RETRY.POINT() in update seesion. Session is functioning OK, But when after completion it return to main form & anybody runs it again then it gives message "Transaction is on, can't continue".
Hope somebody have some suggestions.
Sukhdev
Kees de Jong
9th September 2002, 10:42
Do you close the transaction with a commit.transaction() or abort.transaction()?
Please also look in the BaanERP Programmers' Manual for more information. Can be found via option 'Library' at the top of the BaanBoard pages.
Kees
OmeLuuk
9th September 2002, 11:06
There is a (invisible) db.retry.point() and commit.transaction() in the main flow of the http://www.baanboard.com/programmers_manual_baanerp_help_4gl_features_flow_of_standard_program. You may not interfere with that one.
Also see this thread (http://www.baanboard.com/baanboard/showthread.php?s=&threadid=5870&highlight=commit.transaction%20db.retry.point).
Sukhdev
9th September 2002, 11:40
Thanx Kees.
I closed the transaction with commit.transaction().
Regards
Sukhdev
ayoobi
9th September 2002, 13:23
if u can post ur sources then it will be easier to identify the problem .
Since it is an update session , there is no chance of interference from the standard program transaction handling .
Ayoobi
OmeLuuk
10th September 2002, 10:05
Ayoobi: Since it is an update session , there is no chance of interference from the standard program transaction handling.Disagree. This may apply to a session of type 4 without maintable. But it may be update/print/process etc session. Being an update session does not mean anything.
If the second run of the same session reveals that there is an open transaction, then there is a problem.
Try to run the session with (-- -set) TEST_RETRY=2: this will test on db.retry points and commit.transactions. All transactions will be tested twice. When it loops, your code is wrong.
ayoobi
10th September 2002, 10:42
As far as i know all the session types u mentioned Update/Process/Print , all are Type 4 sessions . ofcourse i can be wrong .
OmeLuuk
10th September 2002, 14:14
Ayoobi: ... of course i can be wrong. I think that is correct ;) See ttadv2530m000 (column Type) to convince yourself.
ayoobi
10th September 2002, 16:29
I think there is some confusion in the terminology (maybe due to different version we are using).
But one thing is certain that in a process/Update/Print Session , The Standard Program Will not at all take care of Transaction Handling .
Ayoobi
OmeLuuk
11th September 2002, 12:31
Ayoobi: ... But one thing is certain that in a process/Update/Print Session, The Standard Program Will not at all take care of Transaction Handling.Can you prove that from the explanation if the flow of STP (see http://www.baanboard.com/programmers_manual_baanerp_help_4gl_features_flow_of_standard_program).
There I read: Most of the main table i/o are mentioned above. They are not available in programs of type 4.
In the help on field ttadv230.ptyp (Baan IVc) in session ttadv2130m000 one can read:POPUP HELP: Program Script Type (ttadv230.ptyp)
1/2/3 (with main table)
The script is used in a session with type 1, 2 or 3 form(s).
4 (single occurrence without main table)
The script is used in a session with type 4 form(s)
0 (3 GL)
The script is used in a session without forms! The script is a 3 GL script.
Scripts with script type 1, 2, 3 or 4 make use of a standard program. You can use sections in the program script like before.program, after.program, etc.
Scripts with script type 0 does not make use of a standard program. You may not use sections. The source must contain a function main().
The type of the script and type of the form(s) belonging to the same session, must be similar.
See also : "Form type" in Maintain Forms (ttadv3100m000)
ayoobi
11th September 2002, 13:17
if you would read the help which u have posted carefully , you will know that i am right .
Also please read this (from the same document in 4GL Programming Features Overview Section)
4GL script types
There are four types of 4GL program scripts:
type 1 (with main table): single-occurrence (details) session
type 2 (with main table): multi-occurrence (overview) session, with group fields
type 3 (with main table): multi-occurrence (overview) session, without group fields
type 4 (without main table): print/processing sessions
Cheers
Ayoobi