Product Documentation

c-treeDB API for C++ - Developers Guide

Previous Topic

Next Topic

Dropping a Database

When you drop a database from a session, the database information is removed from the session dictionary, but the database dictionary file is left untouched. The drop database operation can be reversed with an add database operation. Drop a database from a session by calling CTSession::DropDatabase() method.

// drop MyDatabase from current session

try

{
ASession.DropDatabase("MyDatabase");

}

catch (CTException &err)

{

printf("Drop database failed with error %d\n", err.GetErrorCode());

}

TOCIndex