Product Documentation

FairCom DB API for C

Previous Topic

Next Topic

ctdbNextTable

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

Declaration

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

pTEXT Path, VRLEN PathSize)

Description

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.

Returns

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.

Example


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

do

{ 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()

TOCIndex