Show: Delphi C++
Display Preferences

Dropping or Changing a Server Connection

From RAD Studio
Jump to: navigation, search

Go Up to Managing Server Connections


A connection component drops a connection to the application server when you:

  • Set the Connected property to False.
  • Free the connection component. A connection object is automatically freed when a user closes the client application.
  • Change any of the properties that identify the application server (ServerName, ServerGUID, ComputerName, and so on). Changing these properties allows you to switch among available application servers at run time. The connection component drops the current connection and establishes a new one.
Note: Instead of using a single connection component to switch among available application servers, a client application can instead have more than one connection component, each of which is connected to a different application server.

Before a connection component drops a connection, it automatically calls its BeforeDisconnect event handler, if one is provided. To perform any special actions prior to disconnecting, write a BeforeDisconnect handler. Similarly, after dropping the connection, the AfterDisconnect event handler is called. If you want to perform any special actions after disconnecting, write an AfterDisconnect handler.

See Also

Code Examples

Personal tools
RAD Studio 10.2 Tokyo
In other languages
Previous Versions
Assistance