Product Documentation

FairCom DB API for C

Previous Topic

Next Topic

ctdbGetFirstActiveDatabase

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

Declaration

CTHANDLE ctdbGetFirstActiveDatabase(CTHANDLE Handle,

pVRLEN pScanIndex)

Description

ctdbGetFirstActiveDatabase() retrieves the handle of the first active/connected database in the session. 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. This function is used in conjunction with ctdbGetNextActiveDatabase() to list all of the active databases in a session.

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

Returns

ctdbGetFirstActiveDatabase() returns the handle of the database or NULL if the session contains no active databases.

See also

ctdbAllocSession(), ctdbGetNextActiveDatabase(), ctdbFindActiveDatabase(), ctdbFindActiveDatabaseByUID()

TOCIndex