Active

<< Click to Display Table of Contents >>

Navigation:  Apollo VCL Components > Apollo VCL Component Reference > TApolloConnection > TApolloConnection Properties >

Active

Declaration

Active: Boolean

Description

Setting this to True attempts to connect the client to the server at the location specified by the Host and Port properties. False disconnects from the server. If the connection fails, the OnError event is fired. Otherwise, if an OnError event handler is not defined and the connection fails, an exception is raised that can be trapped by a try…except block. If the User property has been set, an implicit call to the Login method is made and the Password property value is verified on the server. In this case, the OnLogin event is also called. Similarly, when setting Active to False, if a User name and Password were specified, an implicit call to the Logout method is made, and the OnLogout event is fired.

 

image\tip.gif The Host, Port, and Active properties are not used when connecting to Apollo SQL with TApolloQuery (with AccessMethod set to amLocal).

 

See Also

Connect, Disconnect, User, Password, OnLogin, OnLogout