Active IBX data-sets require an active transaction all the time. If you don't have active data-sets just don't forget to commit all the active transactions.
If you have active data-sets, you can configure all your components to use the same TIbTransaction
object, and you can also configure the unique TIbTransaction to commit or rollback after a idle time-out period via the IdleTimer
and DefaultAction
properties.
Terminating the transaction (by manually or automatically committing or rolling back) will close all the linked datasets (TIBQuery
, TIBTable
and the like).
You may be tempted to use the CommitRetaining
or RollbackRetaining
methods to terminate the transaction without closing the related data-sets, but this may affect the performance of the server, and my advise is to always avoid using it.
If you want to improve your application, you should consider changing your database connection layer or introducing a in-memory capable dataset over IBX
, for example, Delphi's TClientDataSet
, which allows you to retrieve data and retain it in memory while closing all the underlying datasets (and transactions), while allowing you to use the traditional Insert/Append/Edit/Delete methods to modify the data and then apply that changes to the database in a new short-time transaction.