Author |
Message
|
Amith |
Posted: Tue Mar 15, 2005 1:10 am Post subject: Database commit problem |
|
|
Novice
Joined: 26 Nov 2003 Posts: 21 Location: india
|
Hi,
I am using a error handler which has a compute node in which i am issuing a database update statement.
When an error occurs i want this Update statement to get commited so, i have set the transaction mode in compute node to COMMIT.
My problem is, in compute node of main flow i have set the transaction mode for the same database to AUTOMATIC. So whenever an error occurs in the main flow i am unable commit the Update statement in the error handler. I am getting the following error message
Quote: |
" active transaction already exists on that database, which would be committed prematurely if this node did a commit. This situation can arise if a previous node which caused a database update on the same DSN had the transaction property of 'automatic' specified. The message flow logic is regarded as inconsistent in such a situation. " |
Is there any way to tackle this problem? |
|
Back to top |
|
 |
JT |
Posted: Tue Mar 15, 2005 5:04 am Post subject: |
|
|
Padawan
Joined: 27 Mar 2003 Posts: 1564 Location: Hartford, CT.
|
Instead of changing the transaction mode property of the Compute node, add the following line of ESQL code after your SQL Update call, and see if it does the trick:
Code: |
PASSTHRU('COMMIT'); |
|
|
Back to top |
|
 |
Amith |
Posted: Tue Mar 15, 2005 5:38 am Post subject: |
|
|
Novice
Joined: 26 Nov 2003 Posts: 21 Location: india
|
I have a doubt, wont all the other database queries get committed if i issue "COMMIT" |
|
Back to top |
|
 |
sieijish |
Posted: Tue Mar 15, 2005 1:06 pm Post subject: |
|
|
Acolyte
Joined: 29 Nov 2004 Posts: 67 Location: London
|
|
Back to top |
|
 |
jefflowrey |
Posted: Tue Mar 15, 2005 1:14 pm Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
The kicker here is that in general, you are better off using a separate message flow to actually store your error data, and use the error handling in your business flows to merely REPORT the error.
It makes your error storage and escalation processing completely separate from your business processing, and allows you to develop, scale and manage it separately. These are good things. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
Amith |
Posted: Tue Mar 15, 2005 10:00 pm Post subject: |
|
|
Novice
Joined: 26 Nov 2003 Posts: 21 Location: india
|
hi,
Thank you for ur suggestion i will move that Update statement into a new flow.
Thanks all |
|
Back to top |
|
 |
|