Page 1 of 1

Data Commited automatically when AutoCommit is False

Posted: Thu 23 Nov 2006 06:48
by devmann
Hi,

I'm not sure if this is a bug or it's a intentional feature.

In a form with some TOraTable objects and a TOraSession is in use.
All AutoCommit property are set to False. TOraTable's CachedUpdate is set to False. I find that every time when the user accidentally close a form while there is modified (but not committed) data in the OraTable, all those modified data are committed to the database server.

Is this feature intentionally added to ODAC? How can I avoid such accidental commit? What I'm doing now is adding some lines in form.OnClose to Rollback all the data. Is there any other better way to do that?

All input are welcome. Thanks very much! :)

These is the software config of my environment.

ODAC version: 4.50.2.1 for Delphi 6
Delphi version: 6 Enterprise build 6.240
Oracle 7.3.3


Rgds,
dm

Posted: Mon 27 Nov 2006 10:27
by Plash
This is designed behaviour. The TOraSession component commits the transaction when the component is destroyed. So you should call Rollback if you don't want the transaction to be committed.