Is transaction NO AUTO UNDO possible/useful?

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
kneighbour
Posts: 77
Joined: Wed 08 Oct 2008 04:55

Is transaction NO AUTO UNDO possible/useful?

Post by kneighbour » Tue 17 Jul 2018 21:23

I am using Firebird 3 with UniDac and Delphi XE7. I am looking to speed up the interactions with Firebird, and I read that setting NO AUTO UNDO with some transactions can speed up things. I am using Unidac in default mode with the default transaction, so I am not using any custom transaction code.

Is it possible to set this option, or does Unidac take care of this for me?

ViktorV
Devart Team
Posts: 3168
Joined: Wed 30 Jul 2014 07:16

Re: Is transaction NO AUTO UNDO possible/useful?

Post by ViktorV » Wed 18 Jul 2018 11:37

To set arbitrary transaction parameters, you should set the DefaultTransaction.IsolationLevel property to ilCustom, and set the parameters you need in the Params property. For example:

Code: Select all

UniConnection.DefaultTransaction.SpecificOptions.Values['Params'] := 'wait;read_committed;rec_version;no_auto_undo';

kneighbour
Posts: 77
Joined: Wed 08 Oct 2008 04:55

Re: Is transaction NO AUTO UNDO possible/useful?

Post by kneighbour » Thu 19 Jul 2018 07:05

Thanks - a good suggestion.

If I set the Connection.DefaultTransaction.Isolationlevel for one particular UniQuery, surly that will change the isolation level for all the other UniQueries that are in the application?

ie UniQuery.connection.DefaultTransaction.IsolationLevel := whatever - surely that will effect all Uni controls using that connection?

ViktorV
Devart Team
Posts: 3168
Joined: Wed 30 Jul 2014 07:16

Re: Is transaction NO AUTO UNDO possible/useful?

Post by ViktorV » Fri 20 Jul 2018 07:36

Yes, you are right, the TUniConnection component and all datasets that work through it, use DefaultTransaction for all operation under data.
If you want to change the transaction settings only for a specific dataset, you can use a separate TUniTransaction component for this dataset.

kneighbour
Posts: 77
Joined: Wed 08 Oct 2008 04:55

Re: Is transaction NO AUTO UNDO possible/useful?

Post by kneighbour » Mon 23 Jul 2018 00:06

Good idea. Many thanks for the useful comments.

ViktorV
Devart Team
Posts: 3168
Joined: Wed 30 Jul 2014 07:16

Re: Is transaction NO AUTO UNDO possible/useful?

Post by ViktorV » Mon 23 Jul 2018 07:52

Thank you for the interest in our products.
If you have any questions during using our products, please don't hesitate to contact us - and we will try to help you solve them.

Post Reply