Product Documentation

FairCom DB API for C

Previous Topic

Next Topic

ctdbDropDatabase

Drop a database from a session dictionary. The data and index files are not deleted from disk.

Declaration

CTDBRET ctdbDropDatabase(CTHANDLE Handle, cpTEXT Name)

Description

ctdbDropDatabase() drops the database from the session dictionary, but does not delete the database file and index file.

  • Handle [in] - the handle of the session that contains the database to be dropped.
  • Name [in] - the database name.

Use ctdbAddDatabase() to add a database to a session. Use ctdbDeleteDatabase() to drop the database from the session and delete the database file and index file.

Returns

ctdbDropDatabase() returns CTDBRET_OK on success, or the c-tree error code on failure.

Example


eRet = ctdbLogon(hSession, "FAIRCOMS", "ADMIN", "ADMIN");

eRet = ctdbDropDatabase(hSession, database_name);

See also

ctdbAllocSession(), ctdbAddDatabase(), ctdbDeleteDatabase()

TOCIndex