Page 1 of 1

Control transactions manually

Posted: Mon 27 Jun 2016 10:48
by dehorter
Hi

I would like to control transactions manually (strictly);

Code: Select all

IF NOT transaction.Active then
    transaction.startTransaction;
SQL.PrepareSQL(True);

.....
IF transaction.Active then
    transaction.Commit;
But I have just realized that it is not really true.

Code: Select all

//IF NOT transaction.Active then
//    transaction.startTransaction;
SQL.PrepareSQL(True);

.....
IF transaction.Active then
    transaction.Commit;
also works because at "SQL.PrepareSQL(True)" transaction is automatically opens.
Is it possible to avoid that and that "SQL.PrepareSQL(True)" instruction create an error if the transaction is not explicitly opens ?
regards
olivier

Re: Control transactions manually

Posted: Mon 27 Jun 2016 12:08
by ViktorV
Yes, you are right. When executing the TIBCStoredProc.PrepareSQL method, the transaction used by the TIBCStoredProc component is starts automatically.
Currently, IBDAC doesn't support error generating on executing the TIBCStoredProc.PrepareSQL method, if the transaction wasn't started manually.
If you want us to implement the feature, please post it at our user voice forum: https://devart.uservoice.com/forums/104 ... e-firebird. If the suggestion gets a lot of votes, we will consider the possibility to implement it.

Re: Control transactions manually

Posted: Tue 28 Jun 2016 09:07
by dehorter
Thanks

I add my vote to the "Add property AutoStartTransaction" proposal.

Re: Control transactions manually

Posted: Wed 29 Jun 2016 13:59
by ViktorV
Thank you for your interest to 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.