ctdbCloseAll
Close all open tables associated with a given database.
Declaration
CTDBRET ctdbCloseAll(CTHANDLE Handle)
Description
ctdbCloseAll() closes all open tables associated with a given database. When the tables are closed, all resources associated with the table fields, indexes, and segments are freed, and the table handles are reset to all default initial parameters. The table handles are not deallocated, though. All locks associated with the tables are released. All of the record handles associated with the tables are reset (but not deallocated/freed). This means that all of the "Current Record" pointers in those record handles are also reset. All of the field handles, index handles, and segment handles associated with the tables are deallocated and their structures in memory are freed up. Closing the tables makes them "non-active". To close a specific table, use ctdbCloseTable().
Returns
ctdbCloseAll() returns CTDBRET_OK on success, or FairCom DB API error code on failure.
Example
ctdbCloseAll(hDatabase);
ctdbDisconnectAll(hSession);
ctdbLogout(hSession);
ctdbFreeTable(hTable);
ctdbFreeDatabase(hDatabase);
ctdbFreeSession(hSession);
See also
ctdbCloseTable()