Product Documentation

c-treeDB API API for C

Previous Topic

Next Topic


Set a new table path.


CTDBRET ctdbSetTablePath(CTHANDLE Handle, pTEXT Path)


ctdbSetTablePath() sets a new table path. Set a table path before a table is created, otherwise the table will be created in the default (server or application) directory. After table creation, the table path is stored in the database dictionary and the user does not need to know it in order to open the table by name. If, for any reason, it is needed to retrieve the table path, use ctdbGetTablePath().

  • Handle [in] the Table Handle.
  • Path [in] the Table Path.


ctdbSetTablePath() returns CTDBRET_OK on success, or c-treeDB API C API error code on failure.


ctdbSetTablePath(hTable, "C:\mydatabase");

eRet = ctdbCreateTable(hTable, table_name, CTCREATE_NORMAL);

See also

ctdbGetTablePath(), ctdbCreateTable()