Product Documentation

FairCom DB API for C

Previous Topic

Next Topic

ctdbDeleteDatabase

Drop the database from session and delete database file and index.

Declaration

CTDBRET ctdbDeleteDatabase(CTHANDLE Handle, cpTEXT Name)

Description

ctdbDeleteDatabase() drops the database from the session dictionary and deletes the database file and index.

  • 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 ctdbDropDatabase() to drop the database from the session dictionary without deleting the database files.

Returns

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

Example


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

eRet = ctdbDeleteDatabase(hSession, database_name);

See also

ctdbAllocSession(), ctdbAddDatabase(), ctdbDropDatabase()

TOCIndex