| Author |
JT400 and commitment control
|
Venkat Sadasivam
Ranch Hand
Joined: May 10, 2008
Posts: 139
|
|
I am using jt400 database driver to connect to AS400 database. Using jt400 I am calling a stored procedure in AS400. When I start commitment control in stored procedure it says commitment control is already active. Whereas I have disabled autocommit and transaction isolation from Java end. I am looking for a solution to make commitment control work inside stored procedure.
|
“Any fool can write code that a computer can understand. Good programmers write code that humans can understand. ”<br>
-Martin Fowler
|
 |
Paul Clapham
Bartender
Joined: Oct 14, 2005
Posts: 16479
|
|
If you want a transaction inside your stored procedure, then turning off commitment control isn't the way to do that. Commitment control is simply the background process which manages transactions. So don't turn it off. (And don't turn it on, either, it should already be on for files which you are updating with that driver.) Sorry, I don't know how to start a transaction inside your stored procedure.
|
 |
Brij Garg
Ranch Hand
Joined: Apr 29, 2008
Posts: 234
|
|
Hi,
If you want a transaction inside your stored procedure, then turning off commitment control isn't the way to do that. Commitment control is simply the background process which manages transactions. So don't turn it off. (And don't turn it on, either, it should already be on for files which you are updating with that driver.)
This means we can not turn off the autoCommit inside stored procedure. Is this restriction is for stored procedure only ?
|
 |
Campbell Ritchie
Sheriff
Joined: Oct 13, 2005
Posts: 32599
|
|
Writing START TRANSACTION; turns auto-commit off until the transaction is completed. Writing COMMIT; at the end of the transaction turns auto-commit back on. As Paul has already told you, leave the auto-commit status alone.
|
 |
 |
|
|
subject: JT400 and commitment control
|
|
|