Use the 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 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)
{
Console.Write("Create database failed with error {0}\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.