ctdbDetachSession
Detaches a FairCom DB API session handle from an existing c-tree connection.
DECLARATION
CTDBRET ctdbDECL ctdbDetachSession(CTHANDLE Handle);
DESCRIPTION
ctdbDetachSession() detaches a FairCom DB API 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 ctdbAllocSesison().
RETURN
Value |
Symbolic Constant |
Explanation |
---|---|---|
0 |
NO_ERROR |
No error occurred. |
See Appendix A for a complete listing of valid c-tree Plus error values.
EXAMPLE
/* logon to c-tree using ISAM function */
INTISAMX(10, 32, 32, 10, (USERPRF_NTKEY | USERPRF_CLRCHK));
/* attach session to server handle */
if (ctdbAttachSession(hSession, NO) != CTDBRET_OK)
printf("ctdbAttachSession failed\n");
/*
... do something useful ...
*/
/* detach from session */
if (ctdbDetachSession(hSession) != CTDBRET_OK)
printf("ctdbDetachSession failed\n");
/* perform an ISAM logout */
CLISAM();
SEE ALSO
ctdbAttachSession()