Find Active DatabasectdbFindActiveDatabase() locates a specific active database and returns the database handle. If the database is not active, ctdbFindActiveDatabase() returns NULL. /* Check if database is active */ CTBOOL IsDatabaseActive(CTHANDLE hSession, pTEXT dbName) {
return (ctdbFindActiveDatabase(hSession, dbName) != NULL) ? YES : NO; } The function above is shown for example only. The c-treeDB API function ctdbIsActiveDatabase() provides a more efficient way to check if a database is active. |
|||