Product Documentation

c-treeDB API API for C

Previous Topic

Next Topic

ctdbGetActiveDatabaseUID

Retrieve the database UID, given the handle of an "active" (connected) database.

Declaration

CTDBRET ctdbGetActiveDatabaseUID(CTHANDLE Handle, pULONG puid)

Description

ctdbGetActiveDatabaseUID() retrieves the database Unique Identifier, UID, given the Database Handle. 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 ctdbGetDatabaseUID() to retrieve the database UID, given the database name. Use ctdbFindDatabaseByUID() to locate a database in a session by its unique identifier.

  • Handle [in] the Database Handle.
  • puid [out] the database UID.

Returns

ctdbGetActiveDatabaseUID() returns CTDBRET_OK on success, or c-treeDB API error on failure.

See also

ctdbAllocDatabase(), ctdbFindDatabaseByUID(), ctdbGetDatabaseUID()

TOCIndex