RAD Studio VCL Reference
|
Determines whether a connection has been established to the remote source of data.
property Connected: Boolean;
__property Boolean Connected;
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.
Disconnecting from a Database Server
Connecting to a Database Server
Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
|
What do you think about this topic? Send feedback!
|