I am using the trial Interbase Data Access components. Everything is working fine. In my applications, I programmed a commit and rollback at the database component level. Are there disadvantages to apply the same methods at the IBCConnection component ? (CommitRetaining and RollbackRetaining) or should I use an IBCTransaction component ?
Thanks for your reponse.
Max.
Using the IBCTransaction component
-
- Posts: 3
- Joined: Mon 31 Jul 2006 10:25
- Location: Belgium
There is no big difference in using IBCConnection.StartTransacion/Commit/Rollback or TIBCTransacion component. IBCConnection transaction control functionality is applied to IBCConnection.DefaultTransaction. By default IBCConnection.DefaultTransaction is initialized with internal TIBCTransaction instance, but if you want you can assign any other TIBCTransaction instance to this property.
Also when you need to use more than one transaction on one connection you can add and link another TIBCTransaction components, by putting them on the form and setting their DefaultConnection properties.
We recommend to use one additional transaction (Update transaction) with each TIBCQuery or TIBCTable. In this case you can set TIBCConnection.DefaultTransaction in "Read-Only Read Committed" mode, and TIBCQuery.UpdateTransaction with "Read Committed" mode. This approach prevents InterBase/Firebird server from holding read transaction as OAT (Oldest Active Transaction) and filling up with unnecessary back versions of records.
Also when you need to use more than one transaction on one connection you can add and link another TIBCTransaction components, by putting them on the form and setting their DefaultConnection properties.
We recommend to use one additional transaction (Update transaction) with each TIBCQuery or TIBCTable. In this case you can set TIBCConnection.DefaultTransaction in "Read-Only Read Committed" mode, and TIBCQuery.UpdateTransaction with "Read Committed" mode. This approach prevents InterBase/Firebird server from holding read transaction as OAT (Oldest Active Transaction) and filling up with unnecessary back versions of records.
-
- Posts: 3
- Joined: Mon 31 Jul 2006 10:25
- Location: Belgium
Transactions handling
Thank you very much for this very helpful comments.
Max.
Max.