How i set off the implicit transaction handling

Discussion of open issues, suggestions and bugs regarding IBDAC (InterBase Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
VICcus
Posts: 8
Joined: Fri 11 May 2012 10:13

How i set off the implicit transaction handling

Post by VICcus » Tue 17 Feb 2015 13:40

Hi

I have a very simple question :)

I use everywhere explicit transaction:
ibcQuery.Transaction.StartTransaction
..
ibcQuery.Open / Query.Execute
..
ibcQuery.Transaction.Commit or Rollback

But the Query.Open works, without the "ibcQuery.Transaction.StartTransaction".
How I set off this behaviour ?

Thanks in advance.

VICcus
Posts: 8
Joined: Fri 11 May 2012 10:13

Re: How i set off the implicit transaction handling

Post by VICcus » Tue 17 Feb 2015 13:49

Additional information: i use different ibctransaction for every ibcQuery / ibcSQL.
Usually.

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

Re: How i set off the implicit transaction handling

Post by ViktorV » Thu 19 Feb 2015 09:34

InterBase/Firebird requires an active transaction for any operation with data, even for opening the dataset. So, when calling TIBCQuery.Open, it is checked whether the transaction bound with it is started, and if not - it is started automatically. This is the standard behavior of our components, and it doesn't provide for disabling.

VICcus
Posts: 8
Joined: Fri 11 May 2012 10:13

Re: How i set off the implicit transaction handling

Post by VICcus » Thu 19 Feb 2015 10:27

Ok, thanks.

I would like to get error, when dont start the transaction explicit. :(

Which transaction start automatically in this case ?
ibcQuery.Transaction or ibcConnection.DefaultTransaction ?

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

Re: How i set off the implicit transaction handling

Post by ViktorV » Thu 19 Feb 2015 10:59

The transaction defined in the TIBCQuery.Transaction property will be started automatically.

VICcus
Posts: 8
Joined: Fri 11 May 2012 10:13

Re: How i set off the implicit transaction handling

Post by VICcus » Thu 19 Feb 2015 15:26

Thanks for all.

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

Re: How i set off the implicit transaction handling

Post by ViktorV » Fri 20 Feb 2015 05:34

Feel free to contact us if you have any further questions about IBDAC.

Post Reply