Product Documentation

c-treeDB API API for C

Previous Topic

Next Topic

ctdbFindTable

Get the path of a table in a database dictionary.

Declaration

CTDBRET ctdbFindTable(CTHANDLE Handle, pTEXT Name, pTEXT Path,

VRLEN PathSize)

Description

ctdbFindTable() retrieves the path of a table in a database dictionary by name. Use ctdbFindTableByUID() to get the name and path of a table by its unique identifier. Use ctdbFindActiveTable() to get the handle of an active/connected table by name.

  • Handle [in] the handle of the database to search.
  • Name [in] the string with the table name to lookup in the database dictionary.
  • Path [out] receives the table path.
  • PathSize [in] the path size in bytes.

ctdbFirstTable() and ctdbNextTable() may be used to obtain the names and paths of all the tables in this database dictionary.

Returns

ctdbFindTable() returns CTDBRET_OK on success, or INOT_ERR (101) if the table cannot be found in the database dictionary, or a c-tree error code on failure.

Example


eRet=ctdbFindTable(hDbase, tb_name, tb_path, sizeof (tb_path));


See also

ctdbAllocDatabase(), ctdbFindTableByUID(), ctdbFirstTable(), ctdbNextTable()

TOCIndex