Product Documentation

c-treeDB API API for C

Previous Topic

Next Topic

ctdbSetTablePath

Set a new table path.

Declaration

CTDBRET ctdbSetTablePath(CTHANDLE Handle, pTEXT Path)

Description

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.

Returns

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

Example


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

eRet = ctdbCreateTable(hTable, table_name, CTCREATE_NORMAL);


See also

ctdbGetTablePath(), ctdbCreateTable()

TOCIndex