[Overview][Constants][Types][Classes][Procedures and functions][Index] Reference for unit 'db' (#fcl)

TDBTransaction

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Encapsulate a transaction

Declaration

Source position: db.pas line 1540

type TDBTransaction = class(TComponent)

protected

  procedure SetDatabase(); virtual;

  procedure CloseTrans;

  procedure openTrans;

  procedure CheckDatabase;

  procedure CheckActive;

  procedure CheckInactive;

  procedure EndTransaction; virtual; abstract;

  procedure StartTransaction; virtual; abstract;

  procedure InternalHandleException; virtual;

  procedure Loaded; override;

public

  constructor Create(); override;

  

Transaction property

  destructor destroy; override;

  

Remove a TDBTransaction instance from memory.

  procedure CloseDataSets;

  

Close all connected datasets

  property DataBase: TDataBase; [rw]

  

Database this transaction is connected to

published

  property Active: Boolean; [rw]

  

Is the transaction active or not

end;

Inheritance

TDBTransaction

  

Encapsulate a transaction

|

TComponent,IUnknown,IInterfaceComponentReference

|

TPersistent

|

TObject

Description

TDBTransaction encapsulates a SQL transaction. It is an abstract class, and should be used by component creators that wish to encapsulate transactions in a class. The TDBTransaction class offers functionality to refer to a TDatabase instance, and to keep track of TDataset instances which are connected to the transaction.

See also

TDBDatabase

TDataset

  

Base class for records-based data-access

The latest version of this document can be found at lazarus-ccr.sourceforge.net.