check if in transaction

Discussion of open issues, suggestions and bugs regarding IBDAC (InterBase Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
inageib
Posts: 184
Joined: Wed 26 Aug 2009 14:11

check if in transaction

Post by inageib » Mon 03 Oct 2011 02:10

Hi,
how I can check if db is in transaction ?

thaks

AndreyZ

Post by AndreyZ » Tue 04 Oct 2011 10:32

You can check if there are active transactions using the following code:

Code: Select all

if IBCConnection.InTransaction then
  ShowMessage('There are active transactions');

inageib
Posts: 184
Joined: Wed 26 Aug 2009 14:11

Post by inageib » Tue 04 Oct 2011 13:29

thanks alot I was trying with the transaction component :)

AndreyZ

Post by AndreyZ » Thu 06 Oct 2011 09:01

InterBase and Firebird support multiple transactions through one connection. When you are checking the TIBCTransaction.Active property, you are checking only if this transaction is active. The TIBCConnection.InTransaction method indicates if there are any active transations (explicit or implicit) that are active and which work through this connection.

inageib
Posts: 184
Joined: Wed 26 Aug 2009 14:11

Post by inageib » Thu 06 Oct 2011 14:20

THANKS ALOT MY FRIEND

Post Reply