ctdbFindActiveDatabaseByUID
Get the handle of an active/connected database by its unique identifier.
Declaration
CTHANDLE ctdbFindActiveDatabaseByUID(CTHANDLE Handle, ULONG uid)
Description
ctdbFindActiveDatabaseByUID() retrieves the handle of an active/connected database in a session by its unique identifier. A database is considered "active" for a given client application if that client has connected that database to the session handle using the ctdbConnect() function.
Note that the UID of a database persists as long as that database remains in the session dictionary. Removing a database from a session dictionary and then re-adding it to the session dictionary is very likely to change that database’s UID.
Use ctdbFindActiveDatabase() to get the handle of an active database by name. Use ctdbGetDatabaseUID() or ctdbGetActiveDatabaseUID() to retrieve the database UID.
Returns
ctdbFindActiveDatabaseByUID() returns the database handle or NULL if the database is not in the session dictionary or is not active/connected. Note: If the specified database is not in the session dictionary, then the UID must be considered invalid.
See also
ctdbFindDatabaseByUID(), ctdbFindActiveDatabase(), ctdbGetDatabaseUID(), ctdbGetActiveDatabaseUID()