Mix explicit transactions and autocommit
-
- Posts: 44
- Joined: Fri 14 Nov 2014 15:26
Mix explicit transactions and autocommit
Is it possible to mix these two modes like it is possible in .net c# by supplying a transaction handle or not? I usually only use transactions where i need it, as many actions are only doing one single activity that either succeeds or fails...
Re: Mix explicit transactions and autocommit
Please specify the database you are working with.
-
- Posts: 44
- Joined: Fri 14 Nov 2014 15:26
Re: Mix explicit transactions and autocommit
I am using firebird. Also I want to use ibdac in the future.
Re: Mix explicit transactions and autocommit
There is an AutoCommit property of connection and of datasets. The AutoCommit property of connection is designed for ability to disable the AutoCommit property of all the datasets. Then if TUniConnection.AutoCommit is set to False, all the transactions may be committed only explicitly (not depending on the dataset's AutoCommit property value). See more details about this in UniDAC help: https://www.devart.com/unidac/docs/ibprov_article.htm
If the connection's AutoCommit property is enabled, the dataset's AutoCommit allows to manage how the dataset commits a transaction. If the AutoCommit property of the dataset is set to True - a transaction will be committed after each modification (even if it is started explicitly). If False - the transaction won't be committed, it must be committed explicitly.
You can't mix both modes within a single dataset. You can disable AutoCommit for particular datasets and control transactions for them explicitly.
If the connection's AutoCommit property is enabled, the dataset's AutoCommit allows to manage how the dataset commits a transaction. If the AutoCommit property of the dataset is set to True - a transaction will be committed after each modification (even if it is started explicitly). If False - the transaction won't be committed, it must be committed explicitly.
You can't mix both modes within a single dataset. You can disable AutoCommit for particular datasets and control transactions for them explicitly.