RAD Studio |  |

Dropping or Changing a Server Connection
See Also
Collapse All

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 runtime. 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

Connecting to the Server

Calling Server Interfaces

Connecting to an Application Server That Uses Multiple Data Modules

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