Page 1 of 1

Best place to start a transaction

Posted: Wed 06 Aug 2014 04:14
by testpresta
Hello

Suppose i have a sort of order screens:

- a screen with order list
- an order detail screen with an ok button.

actually, i start a transaction when the user clicks on the ok button of the detail screen (just before SQL queries).
I am wondering if it is a good thing. Is it a good way ? Should the transaction be started when the user just access to detail screen ?

Thanks

Re: Best place to start a transaction

Posted: Wed 06 Aug 2014 12:14
by CristianP
The best practice is to keep the transaction time as short as possible.
Especially for a high transaction isolation level and many concurrent queries on same data.
Here is a summary:
http://en.wikipedia.org/wiki/Isolation_ ... k_Duration

Best regards,
Cristian Peta

Re: Best place to start a transaction

Posted: Wed 06 Aug 2014 12:45
by azyk
This question is not related to UniDAC functionality. Your question about using transactions in your case taking into account all the requirements to your product should be forwarded to the documentation and developers of the database you are using.

Re: Best place to start a transaction

Posted: Wed 06 Aug 2014 14:16
by testpresta
I am sorry. In fact i was wondering if there was some specific cases to TUniTransaction component, not only database engine

Re: Best place to start a transaction

Posted: Fri 08 Aug 2014 12:42
by azyk
For more details on using UniDAC transactions, refer to our online documentation: http://www.devart.com/unidac/docs/index ... action.htm
Feel free to contact us, if your still have questions after reading the documentation.