RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TSQLConnection.Connected Property

Specifies whether the connection is active.

Pascal
property Connected: Boolean;
C++
__property Boolean Connected;

Set Connected to trueto establish a connection to the database server. When a dataset that uses the TSQLConnection object is activated, it automatically sets Connected to true. Set Connected to false to close a connection. 

Setting Connected to true generates a BeforeConnect event, establishes the connection, and generates an AfterConnect event. In addition, when setting Connected to true, TSQLConnection may display a login dialog, depending on the value of LoginPrompt.  

Setting Connected to false generates a BeforeDisconnect event, drops the connection, and generates an AfterDisconnect event. 

 

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!