Skip to content

TSQLQuery.Transaction

Transaction in which to execute SQL statements.

Declaration

Source position: sqldb.pp line 734

published property Transaction;

Description

Transaction must be set to a SQL transaction (of type TSQLTransaction) component. All SQL statements (SQL / InsertSQL / updateSQL / DeleteSQL) etc.) will be executed in the context of this transaction.

The transaction must be connected to the same database instance as the query itself.

Multiple TSQLQuery instances can be connected to a transaction at the same time. If the transaction is rolled back, all changes done by all TSQLQuery instances will be rolled back.

See also

Name Description
TSQLQuery.Database The TSQLConnection instance on which to execute SQL Statements.
TSQLConnection An abstract class representing a connection to a SQL Database.
TSQLTransaction Transaction in which a TSQLQuery is handled.