IBCTable and commitretaining

Discussion of open issues, suggestions and bugs regarding IBDAC (InterBase Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
calou
Posts: 116
Joined: Tue 27 May 2008 12:46

IBCTable and commitretaining

Post by calou » Tue 10 May 2011 15:44

Hello,

When i call IBCTable.post a commit retaining is done. Is it possible to "force" a commit instead of commitretaining?

Thnaks for help

calou
Posts: 116
Joined: Tue 27 May 2008 12:46

Post by calou » Thu 12 May 2011 07:46

no answer? :oops:

AndreyZ

Post by AndreyZ » Thu 12 May 2011 11:49

Hello,

For the time being you can avoid the CommitRetaining method invoking only if you start transactions explicitly. We will change such IBDAC behaviour in the next build. In the next IBDAC build you will be able to avoid the CommitRetaining method invoking by using different transactions in the Transaction and UpdateTransaction properties of the TIBCTable and TIBCQuery components.

calou
Posts: 116
Joined: Tue 27 May 2008 12:46

Post by calou » Thu 12 May 2011 12:31

Thanks for the answer

Regards

Joao Cadilhe
Posts: 27
Joined: Wed 30 Jan 2008 19:29
Location: Brazil

Post by Joao Cadilhe » Mon 09 Jan 2012 11:32

In the next IBDAC build you will be able to avoid the CommitRetaining method invoking by using different transactions in the Transaction and UpdateTransaction properties of the TIBCTable and TIBCQuery components.
Is this feature already implemented?
I want to buy IBDAC license to convert Fibplus application to IBDAC
but "Fibplus like" transaction control with read transaction and write update transaction with 'hard' commit only used for update/insert/delete, opened and closed automatically (autocommit = true), is very important to me.

Is this feature present in Unidac?


Thanks.

Joao Cadilhe.

AndreyZ

Post by AndreyZ » Mon 09 Jan 2012 17:41

To make UniDAC perform Commit for update, delete, and insert operations, you should use two transactions, one for reading, another for all other operations. Here is an example that demonstrates this:

Code: Select all

UniQuery1.Transaction := UniTransaction1; // transaction for reading
UniQuery1.UpdateTransaction := UniTransaction2; // transaction for all other operations
UniQuery1.Open;
UniQuery1.Edit;
UniQuery1.FieldByName('fieldname').AsString := 'test';
UniQuery1.Post; // here UniDAC automatically commits changes

Post Reply