Multiple transaction error

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
cointec
Posts: 50
Joined: Fri 11 Dec 2015 11:02

Multiple transaction error

Post by cointec » Sun 15 May 2016 09:14

Hello, I'm using UniDAC to connect to Firebird and Oracle.
In firebird I have two datamodules (for example). When I create each datamodule, I start a transaction contained in each one.
It runs fine in Firebird, but in oracle I get an exception that says that cannot be opened more than one transaction per connection. I know is a restriction of Oracle, but I have read that when doing it, UniDAC manages it and only uses one transaction.
Have I missing something in the configuration?

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Re: Multiple transaction error

Post by AlexP » Tue 17 May 2016 06:16

Hello,

Oracle doesn't support multi-transactions, this feature is supported only in InterBase and Firebird.
The InTransaction property defines an active (running) transaction. If this property value is True, the transaction is running.

cointec
Posts: 50
Joined: Fri 11 Dec 2015 11:02

Re: Multiple transaction error

Post by cointec » Tue 17 May 2016 10:53

I know it, but I think I have read in the documentation of UniDac, that in case of multiple transaction components in other rdbms (not firebird/interbase) Unidac manages them and does not start more than one transaction.

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Re: Multiple transaction error

Post by AlexP » Tue 17 May 2016 13:09

It is said in the help:
Each time you are about to start a transaction, you should check whether it is active. You can
do this using the InTransaction property. Call to StartTransaction when the transaction is already active will cause
an exception.
and this behavior is applied to all the providers, but Firebird/InterBase

Post Reply