Product Documentation

c-treeDB API API for C

Previous Topic

Next Topic

ctdbGetNextActiveDatabase

Retrieve the handle of the next active/connected database in the session.

Declaration

CTHANDLE ctdbGetNextActiveDatabase(CTHANDLE Handle, pVRLEN pScanIndex)

Description

ctdbGetNextActiveDatabase() retrieves the handle of the next active/connected database in the session. You must first get the first active database handle in the session with ctdbGetFirstActiveDatabase() before retrieving the next active database handle using this function. A database is considered "active" for a given client application if that client has connected that database to his session handle using the ctdbConnect() function.

  • Handle [in] the session handle.
  • pScanIndex [out] the pointer to a VRLEN to hold the scan state. It is returned by ctdbGetFirstActiveDatabase(), and it is updated in the ctdbGetNextActiveDatabase() function.

Returns

ctdbGetNextActiveDatabase() returns the database handle, or NULL if the handle of the last active/connected database in the session has already been retrieved.

See also

ctdbAllocSession(), ctdbGetFirstActiveDatabase(), ctdbFindActiveDatabase(), ctdbFindActiveDatabaseByUID()

TOCIndex