Previous Topic

Next Topic

Adding an existing Database

Use ctdbAddDatabase() to add an existing database to the current session. ctdbAddDatabase() takes a session or a database handle, the database name and the path where the database is located.

/* add MyDatabase to the current session */
if (ctdbAddDatabase(hSession, “MyDatabase”, “”) != CTDBRET_OK)
{
   printf(“Add database failed\n”);
}