Unit 'SQLDB' Package
[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] [#fcl]

TSQLTransaction.Commit

Commit the transaction, end transaction context.

Declaration

Source position: sqldb.pp line 351

public procedure TSQLTransaction.Commit; override;

Description

Commit commits an active transaction. The changes will be irreversibly written to the database.

After this, the transaction is deactivated and must be reactivated with the StartTransaction method. To commit data while retaining an active transaction, execute CommitRetaining instead.

Errors

Executing Commit when no transaction is active will result in an exception. A transaction must be started by calling StartTransaction. If the database backend reports an error, an exception is raised as well.

See also

StartTransaction

  

Start a new transaction.

CommitRetaining

  

Commit the transaction, retain transaction context.

Rollback

  

Roll back all changes made in the current transaction.

RollbackRetaining

  

Roll back changes made in the transaction, keep transaction context.


Documentation generated on: Dec 27 2024