Page 1 of 1

Transactions and ClientDataSet with PacketRecords

Posted: Fri 29 Jan 2016 18:41
by eliseu_corrona
I would just take a doubt about read-only transactions and ClientDataSet using the PacketRecords feature.

We use Delphi XE with update 1, Firebird 2.5.5 and Devart Corelab for Interbase/Firebird version In our system, the transaction control is explicit . We control manually to ensure that most of the transactions be managed. In querys, we use read-only transactions. We identify a situation when are used read-only or read committed transactions in a TClientDataSet with PacketRecords .

First, start the transaction , then open the DataSet and finalize the transaction. We note that the transaction remains open until the ClientDataSet fetch all data. The sometimes transaction is finished automatically. Other sometimes not. To monitor the processes we use Sinatica Software ( .

Code block sample:

Code: Select all

Procedure TForm2.BtnOpenDataSetClick(Sender: TObject);
  LTransaction: TDBXTransaction;

  CdsCustomer.PacketRecords := 30;

    LTransaction := StartTransactionReadOnly;

   //Transaction not finshed because SQLConnection not in InTransaction.


Based on this, I have the following questions:

1 ) Is it possible manage manually and securely a transaction in querys using ClientDataSet with PacketRecords?

2 ) Is it possible that due to demand of connections and process, corelab driver not manage with 100% efficient the transactional control?


Re: Transactions and ClientDataSet with PacketRecords

Posted: Mon 08 Feb 2016 10:11
by eliseu_corrona
Hi Devart Team.
Any news about my question?

Re: Transactions and ClientDataSet with PacketRecords

Posted: Tue 23 Feb 2016 11:42
by ViktorV
This behavior of our driver is correct. Since InterBase/Firebird requires an active transaction for each operation with data, the active transaction remains open until all the data is retrieved. When using the PacketRecords property, data is read out by blocks, and until the last block is retrieved, in other words, the end of the dataset is reached, the transaction will remain open. This behavior is related not to dbExpress driver for InterBase & Firebird, but to the dbExpress technology. Unfortunately we can't affect it.

Re: Transactions and ClientDataSet with PacketRecords

Posted: Tue 23 Feb 2016 11:52
by eliseu_corrona
Hi ViktorV. Thanks for your answer and clarification.


Eliseu Corrona.

Re: Transactions and ClientDataSet with PacketRecords

Posted: Tue 23 Feb 2016 12:06
by ViktorV
If you have any questions during using our products, please don't hesitate to contact us - and we will try to help you solve them.