Page 1 of 1
Commit TUniTransaction before closing TUniTable
Posted: Fri 29 Aug 2014 15:35
by testpresta
Hello
I have several TUniTable components which property transaction is set to an unique TUniTransaction.
I start transaction before opening any table.
Then, i close some tables before commit transaction and i close other tables after commit transaction.
(same thing for rollback).
Does it works properly this way ?
Thanks
Re: Commit TUniTransaction before closing TUniTable
Posted: Tue 02 Sep 2014 13:03
by azyk
We don't fully understand the point of your question. If you have encountered a problem in a particular case, please describe it in more details.
Re: Commit TUniTransaction before closing TUniTable
Posted: Wed 03 Sep 2014 07:02
by testpresta
Everything works but i want to know what is the best practice:
- I open TUniTable
- I start a TUniTransaction that is associate to the previous TUniTable
- I append or edit TUniTable then post
- I close the TUniTable component (close method)
- I commit transaction
or
- I open TUniTable
- I start a TUniTransaction that is associate to the previous TUniTable
- I append or edit TUniTable then post
- I commit transaction
- I close the TUniTable component (close method)
Re: Commit TUniTransaction before closing TUniTable
Posted: Tue 09 Sep 2014 10:37
by azyk
We can not give a definite answer to such a general question. You should choose a transaction control logic depending on the business logic of your application and the used DBMS.