Who is using what? TIBCConnection.DefaultTransaction, .ExecSQL and .SQL
Posted: Wed 29 Aug 2012 10:25
Hello,
we just bought IBDAC for our new application. I'm just implementing it and wondered how these 3 mentioned objects relate to each other.
I configured the DefaultTransaction to be our standard read-transaction that stays open for as long as it's needed (as it's iblReadOnlyReadCommitted it shouldn't slow down anything). For any updates and inserts we want to use explicit other transactions with TCustomDADataSet or TCustomDASQL descendents.
When doing a DELETE (or any other operation I don't need a result for), I want to use the most lightweight and fastest option possible:
we just bought IBDAC for our new application. I'm just implementing it and wondered how these 3 mentioned objects relate to each other.
I configured the DefaultTransaction to be our standard read-transaction that stays open for as long as it's needed (as it's iblReadOnlyReadCommitted it shouldn't slow down anything). For any updates and inserts we want to use explicit other transactions with TCustomDADataSet or TCustomDASQL descendents.
When doing a DELETE (or any other operation I don't need a result for), I want to use the most lightweight and fastest option possible:
- Which transaction is used when calling TIBCConnection.ExecSQL? I assume it's TIBCConnection.DefaultTransaction, so this is not the right way to do it (please confirm this). I further assume TIBCConnection.ExecSQL uses TIBCConnection.SQL object internally (please confirm or refute).
- TIBCConnection has a built-in TIBCSQL in TIBCConnection.SQL. Is TIBCConnection.SQL.Transaction different to TIBCConnection.DefaultTransaction?
- If yes (please confirm or refute), I assume this would be the most lightweight and fastest option (instantiate new TIBCTransaction, configure it, use it with TIBCConnection.SQL, set TIBCConnection.SQL.Transaction to nil, free newly instantiated TIBCTransaction).
- If not, I would temporally instantiate an Instance of TIBCSQL to do the operation.