Attach and Detach Existing SessionsThere are situations where an existing connection to c-tree already exists, via a call to a low level or ISAM c-tree initialization function, but c-treeDB functionality is required without terminating the existing connection and starting a new c-treeDB session. The following methods are available to permit a session handle to be attached and detached from an existing c-tree connection. CTSession::Attach() attaches an inactive session handle to an existing c-tree Plus or c-treeDB session. Attached sessions have no information on server, user name or user password, and these values are set to NULL. If a Logout() is performed on an attached session handle, no session logout is performed and a DetachSession() call is executed instead. There are three valid mode values:
CTSession::Detach() detaches a c-treeDB session handle. The c-tree ISAM or low-level un-initialization is not called, but the session handle control structures are released and re-initialized. Handle is a session handle allocated by AllocSesison(). DetachSession() returns CTDBRET_OK on success. |
|||||||||||