ctdbFindDatabase
Get the path of a database by name.
Declaration
CTDBRET ctdbFindDatabase(CTHANDLE Handle, pTEXT Name, pTEXT Path,
VRLEN PathSize)
Description
ctdbFindDatabase() retrieves the path of any database in the session dictionary by name.
Use ctdbFindDatabaseByUID() to get the name and path of a database by its unique identifier.
Use ctdbFindActiveDatabase() to get the session handle of an active/connected database by name.
Returns
ctdbFindDatabase() returns CTDBRET_OK on success, or INOT_ERR (101) if the database is not in the session dictionary, or a c-tree error code on failure.
Example
eRet = ctdbLogon(hSession, "FAIRCOMS", "ADMIN", "ADMIN");
eRet = ctdbFindDatabase(hSession, db_name, db_path, sizeof(db_path));
See also
ctdbFindDatabaseByUID(), ctdbFirstDatabase(), ctdbNextDatabase(), ctdbFindActiveDatabase()