RefreshConnectionState Method
Refreshes the connection state: updates the Connected, LoggedIn, and ProjectConnected properties.
Visual Basic
Public Sub RefreshConnectionState() 

If the connection is broken without a call to ReleaseConnection, Connected, LoggedIn, and ProjectConnected remain true. This can happen if the connection is broken by the server, rather than by the OTA application.  For example, an administrator may disconnect the project from the user interface.

To ensure the validity of these properties, call RefreshConnectionState before accessing them. The correct order of the calls is RefreshConnectionState, then Connected, and then LoggedIn or ProjectConnected.

Calling ReleaseConnection in a loop may affect performance.

For a table of properties affected by the state of the connection, see the Remarks for the TDConnection object.

See Also