Data.SqlExpr.TSQLConnection.InTransaction

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

property InTransaction: Boolean read GetInTransaction;

C++

__property bool InTransaction = {read=GetInTransaction, nodefault};

Properties

Type Visibility Source Unit Parent
property public
Data.SqlExpr.pas
Data.SqlExpr.hpp
Data.SqlExpr TSQLConnection

Description

Indicates whether a transaction is in progress.

Read InTransaction at runtime to ascertain whether a transaction is currently active for the SQL connection component. If the connection component is currently in a transaction, all communication with the server that passes through the connection is enlisted in that transaction.

InTransaction is true if there is an active transaction. If no transaction is active, InTransaction is false.

A transaction begins when the application calls BeginTransaction and lasts until the application calls CommitFreeAndNil, RollbackFreeAndNil, or RollbackIncompleteFreeAndNil. If there are multiple transactions, InTransaction remains true until all transactions are either committed or rolled back.

See Also