Product Documentation

c-treeDB API for C++ - Developers Guide

Previous Topic

Next Topic

Adding an existing Database

An existing database may be added or imported to a session by calling the CTSession::AddDatabase() method. Use CTSession::AddDatabase() to add an existing database to the current session. CTSession::AddDatabase() takes a database name and the path where the database is located.

// add MyDatabase to the current session

try

{
ASession.AddDatabase("MyDatabase", "");

}

catch (CTException &err)

{

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

}

TOCIndex