Page 1 of 1

IBCTable and commitretaining

Posted: Tue 10 May 2011 15:44
by calou
Hello,

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

Thnaks for help

Posted: Thu 12 May 2011 07:46
by calou
no answer? :oops:

Posted: Thu 12 May 2011 11:49
by AndreyZ
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.

Posted: Thu 12 May 2011 12:31
by calou
Thanks for the answer

Regards

Posted: Mon 09 Jan 2012 11:32
by Joao Cadilhe
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.

Posted: Mon 09 Jan 2012 17:41
by AndreyZ
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