Product Documentation

FairCom DB API for C

Previous Topic

Next Topic

ctdbOpenTableByUID

Open an existing table, given its UID.

Declaration

CTDBRET ctdbOpenTableByUID(CTHANDLE Handle, ULONG uid,

CTOPEN_MODE OpenMode)

Description

ctdbOpenTableByUID() opens an existing table, given its unique identifier. The database that contains the table was specified previously, when table handle ‘Handle’ was allocated. FairCom DB API will look for the table and index files in the server directory (client/server applications) or in the execution directory (standalone applications).

To override this default directory, specify your own directory with ctdbSetTablePath() before you call this function.

To open a table that is protected with a password, call ctdbSetTablePassword() with Handle before you call this function.

To open the table given its name, use ctdbOpenTable(). To create a table, use ctdbCreateTable(). To retrieve the table open mode, use ctdbGetTableOpenMode(). To close an open table, use ctdbCloseTable().

  • Handle [in] the Table Handle, previously allocated and associated with a database by calling ctdbAllocTable().
  • uid [in] the table unique identifier.
  • OpenMode [in] the table open mode. The valid values for the table open mode are listed in FairCom DB API definitions.

Returns

ctdbOpenTableByUID() returns CTDBRET_OK on success, or FairCom DB API error on failure.

See also

ctdbAllocTable(), ctdbCreateTable(), ctdbGetTableOpenMode(), ctdbCloseTable(), ctdbOpenTable()

TOCIndex