Connection InTransaction Always True after opening Query?

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
Brob
Posts: 44
Joined: Mon 24 Oct 2011 07:31

Connection InTransaction Always True after opening Query?

Post by Brob » Fri 21 Feb 2014 12:22

Hi
I'm connecting to a firebird/Interbase database and opening a TUniQuery containing a simple select statement. In the past I've always used UniQuery.Connection.InTransaction as one of the methods to check if any changes may have been made or are in progress. But this always seems to be true as soon as the TUniQuery is opened!

Am I doing something wrong?
Rad Studio 2007 Unidac Version 5.2.5

PavloP
Devart Team
Posts: 149
Joined: Fri 24 Jan 2014 12:33

Re: Connection InTransaction Always True after opening Query?

Post by PavloP » Wed 14 May 2014 15:17

The InTransaction property of the TUniConnection component returns the default transaction status. The specificity of the Firebird server is that an open dataset always requires an active transaction. If you don't assign a separate TUniTransaction component for a dataset, then the dataset will use the default transaction of its TUniConnection component.
For actions modification, you can use a separate transaction and check its status.

Post Reply