TUniConnection.AutoCommit with Firebird

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
chkaufmann
Posts: 82
Joined: Sat 01 Jul 2006 11:42

TUniConnection.AutoCommit with Firebird

Post by chkaufmann » Wed 11 Oct 2017 12:18

Hi,
I try to understand AutoCommit with Firebird connections.

When I use StartTransaction, then do some updates / inserts and then use Rollback, this doesn't work. But GDS.isc_commit_transaction was never called.

So is the AutoCommit flag applied to the transaction properties and handled by the Firebird server?

Is this Firebird specific? Shouldn't AutoCommit be set to false in StartTransaction if the behaviour is like this?

Regards
Christian

ViktorV
Devart Team
Posts: 3168
Joined: Wed 30 Jul 2014 07:16

Re: TUniConnection.AutoCommit with Firebird

Post by ViktorV » Wed 11 Oct 2017 12:34

To solve the issue, please set the AutoCommit property to False for TUniConnection or dataset.
The AutoCommit property has the True value by default that leads to automatically execution of CommitRetaining or RollbackRetaining when there is any data modification. By setting the property to False, you will get rid of this behavior, however, you will have to manage the transactions by yourself.
The TUniConnection.AutoCommit property has a higher priority than the specific option "AutoCommit" of datasets (TUniQuery, TUniTable). If the TUniConnection.AutoCommit property is set to False, all transactions can be committed only explicitly (despite of the specific option "AutoCommit" value of a dataset).

mufalo
Posts: 15
Joined: Mon 21 Nov 2005 18:00

Re: TUniConnection.AutoCommit with Firebird

Post by mufalo » Fri 29 Dec 2017 17:59

I have a problem with AutoCommit too.
I think that should work only when the related transaction is not explicitly opened, instead as work today, were always run CommitRetaining, independent of the transaction status.

ViktorV
Devart Team
Posts: 3168
Joined: Wed 30 Jul 2014 07:16

Re: TUniConnection.AutoCommit with Firebird

Post by ViktorV » Tue 02 Jan 2018 10:06

This is standard behavior of our components, which is used by many users, and currently we cannot change it.
If you want us to implement the feature, please post this suggestion at our user voice forum: https://devart.uservoice.com/forums/104 ... components If the suggestion gets a lot of votes, we will consider the possibility to implement it.

Post Reply