Use CTSesson::CreateDatabase() method to create a new database. CTSession::CreateDatabase() takes a database name and the path where the database dictionary file is to be created. If the database path is NULL or empty ("") the database is created in the server directory, for client/server applications, or in the current directory for standalone applications.
// create a new database MyDatabase
try
{
ASession.CreateDatabase("MyDatabase", "");
}
catch (CTException &err)
{
printf("Create database failed with error %d\n", err.GetErrorCode());
}
CTSession::CreateDatabase() creates a new database dictionary file with the database name and extension .FDD (FairCom Database Dictionary). Using the example above, the database dictionary file created is MyDatabase.fdd.