Product Documentation

c-treeDB API API for C

Previous Topic

Next Topic


Get the name and path of the next table in a database dictionary.


CTDBRET ctdbNextTable(CTHANDLE Handle, pTEXT Name, VRLEN NameSize,

pTEXT Path, VRLEN PathSize)


ctdbNextTable gets the name and the path of the next table in a database dictionary.

  • Handle [in] the Database Handle.
  • Name [out] receives the table name.
  • NameSize [in] the Name size in bytes.
  • Path [out] receives the table path.
  • PathSize [in] the Path size in bytes.

ctdbNextTable(), in conjunction with ctdbFirstTable(), may be used to obtain the names and paths of all tables available in this database dictionary. ctdbGetTableCount() may be used to retrieve the total number of tables in the database.


ctdbNextTable() returns CTDBRET_OK on success, or the c-tree error code on failure. Note that INOT_ERR (101) is returned after the last table in the database dictionary has been retrieved.


ctdbFirstTable(hDB, t_name, sizeof(t_name), t_path, sizeof (t_path));


{ printf("\ntable name: %s", t_name); }

while (ctdbNextTable(hDB, t_name, sizeof(t_name), t_path,

sizeof(t_path)) == CTDBRET_OK);

See also

ctdbFirstTable(), ctdbFindTable(), ctdbGetTableCount()