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

TCustomConnection

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

Abstract class for connections to a server

Declaration

Source position: db.pas line 1855

type TCustomConnection = class(TComponent)

public

  procedure Close;

  

Close the connection

  destructor Destroy; override;

  

Remove the TCustomconnection instance from memory

  procedure Open;

  

Makes the connection to the server

  DataSetCount: LongInt;

  

Number of datasets connected to this connection

  DataSets: TDataSet;

  

Datasets linked to this connection

published

  Connected: Boolean;

  

Is the connection established or not

  LoginPrompt: Boolean;

  

Should the OnLogin be triggered

  AfterConnect: TNotifyEvent;

  

Event triggered after a connection is made.

  AfterDisconnect: TNotifyEvent;

  

Event triggered after a connection is closed

  BeforeConnect: TNotifyEvent;

  

Event triggered before a connection is made.

  BeforeDisconnect: TNotifyEvent;

  

Event triggered before a connection is closed

  OnLogin: TLoginEvent;

  

Event triggered when a login prompt is shown.

end;

Inheritance

TCustomConnection

  

Abstract class for connections to a server

|

TComponent,IUnknown,IInterfaceComponentReference

|

TPersistent,IFPObserved

|

TObject

Description

TCustomConnection must be used for all database classes that need a connection to a server. The class introduces some methods and classes to activate the connection (Open) and to deactivate the connection (TCustomConnection.Close), plus a property to inspect the state (Connected) of the connected.

See also

TCustomConnection.Open

  

Makes the connection to the server

TCustomConnection.Close

  

Close the connection

TCustomConnection.Connected

  

Is the connection established or not


Documentation generated on: Feb 02 2013