FairCom Corporation


4.3.36 ctdbCreateDatabase


Create a new database.

Declaration

CTDBRET ctdbCreateDatabase(CTHANDLE Handle, pTEXT Name, pTEXT Path)

Description

ctdbCreateDatabase creates a new database. To create a Session, use ctdbCreateSession. To create a table, use ctdbCreateTable. The unique identifier, UID, is associated with the Database at the time of its creation.

In order to create a database, first initiate a session with ctdbAllocSession and then logon to the c-tree Server or c-tree Plus instance using ctdbLogon.

Returns

ctdbCreateDatabase returns CTDBRET_OK on success, or c-treeDB C API error code on failure.

Example

eRet = ctdbCreateDatabase(hSession, database_name, database_path);
eRet = ctdbConnect(hDatabase, database_name);

See also

ctdbAllocDatabase, ctdbAddDatabase, ctdbCreateSession, ctdbCreateTable, ctdbLogon


FairCom Corporation
www.faircom.com