Sign in Join
FPDoc Onlineexperiment

TCustomConnection.Open procedure

Member of TCustomConnectionpublicIn unit DB

Makes the connection to the server.

Declaration

pascal
procedure Open

Description

Open establishes the connection with the server if it was not yet connected. Calling this method first triggers the BeforeConnect event. If an exception is raised during the execution of that event handler, the connect process is aborted. If LoginPrompt is True, the OnLogin event handler is called. Only after this event, the connection is actually established. After the connection was established, the AfterConnect event is triggered.

Calling the Open method is equivalent to setting the Connected property to True.

Errors

If an exception is raised during the BeforeConnect or OnLogin handlers, the connection is not actually established.

See also

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.