One active IB transaction in the life of one user application

Are there any negative consequences when a single-user application uses only one IB transaction, which is active as long as the program is running? Using only CommitRetaining and RollbackRetaining.

Reference Information. I want to use IBQuery and connect them to a DB grid (DevExpress), which immediately loads all the records into memory. Therefore, I want to avoid re-fetching all the data after every SQL insert command. IBTransaction.Commit will close the data set.

+3
source share
2 answers

It seems to me that you are trying to use the database function to avoid using TClientDataSet, which is clearly the preferred way to work in Delphi these days. Why get out of the way and use dubious transaction methods instead of following a more common pattern for using database components, which is already the best solution?

+4
source

CommitRetaining and RollbackRetaining are not suitable.

The transaction should be very short.

+1
source

Source: https://habr.com/ru/post/1729426/


All Articles