Datasnap.Win.MConnect.TDispatchConnection.Connected

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

property Connected: Boolean read GetConnected write SetConnected default 0;

C++

__property Connected = {default=0};

Properties

Type Visibility Source Unit Parent
property published
Datasnap.Win.MConnect.pas
Datasnap.Win.MConnect.hpp
Datasnap.Win.MConnect TDispatchConnection

Description

Determines whether a connection has been established to the remote source of data and is active.

Datasnap.Win.MConnect.TDispatchConnection.Connected inherits from Data.DB.TCustomConnection.Connected. All content below this line refers to Data.DB.TCustomConnection.Connected.

Determines whether a connection has been established to the remote source of data and is active.

Set Connected to True to open the connection. Set Connected to False to terminate the connection.

Setting Connected to True generates a BeforeConnect event, calls the protected DoConnect method to establish the connection, and generates an AfterConnect event. In addition, when setting Connected to True TCustomConnection may display a login dialog, depending on the value of LoginPrompt.

Setting Connected to False generates a BeforeDisconnect event, calls the protected DoConnect method to drop the connection, and generates an AfterDisconnect event.

When deriving custom connection components from TCustomConnection, override GetConnected to return True when a connection is established, and override DoConnect and DoDisconnect to create and drop the connection.

See Also

Code Examples