ctdbFirstTable
Get the name and path of the first table in a database dictionary.
Declaration
CTDBRET ctdbFirstTable(CTHANDLE Handle, pTEXT Name, VRLEN NameSize,
pTEXT Path, VRLEN PathSize)
Description
ctdbFirstTable() gets the name and path of the first table in a database dictionary.
ctdbFirstTable(), in conjunction with ctdbNextTable(), may be used to obtain the names and paths of all the tables in this database dictionary. ctdbGetTableCount() may be used to retrieve the total number of tables in the database dictionary.
Returns
ctdbFirstTable() returns CTDBRET_OK on success, or INOT_ERR (101) if there are no tables in the database dictionary, or a c-tree error code on failure.
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
ctdbFirstDatabase(), ctdbNextTable(), ctdbFindTable(), ctdbGetTableCount()