Data Commited automatically when AutoCommit is False

Discussion of open issues, suggestions and bugs regarding ODAC (Oracle Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
devmann
Posts: 4
Joined: Tue 21 Nov 2006 03:26

Data Commited automatically when AutoCommit is False

Post by devmann » Thu 23 Nov 2006 06:48

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

Plash
Devart Team
Posts: 2844
Joined: Wed 10 May 2006 07:09

Post by Plash » Mon 27 Nov 2006 10:27

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.

Post Reply