control the commit transaction

Discussion of open issues, suggestions and bugs regarding ODAC (Oracle Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
korg1000

control the commit transaction

Post by korg1000 » Thu 19 Jan 2006 14:43

I'm using the trial version of odac, with oracle 10g.
But i cant control my commit ou rollback.
I set the Autocommit to false, in OraSession and OraQuery, and make a edit in the data (ex. change the value of field Name = 'abcde' to 'edcba' , and close the apllication (without commit). When i open again, the value was commited automatically. I dont wanna to use cachedupdates.
How can i to control the commit/rollback transactions?

Challenger
Devart Team
Posts: 925
Joined: Thu 17 Nov 2005 10:53

Post by Challenger » Wed 25 Jan 2006 13:18

If in your code you neither commit nor rollback a transaction then it will be implicitly commited either by ODAC or by Oracle server when session is closed. So if you want to change this behavior you should call Commit or Rollback after changing data. Another way is to write BeforeDisconnect event handler for TOraSession to Rollback transaction on session close.

Post Reply