FairCom Corporation


4.3.35 ctdbConnect


Connect to a database.

Declaration

CTDBRET ctdbConnect(CTHANDLE Handle, pTEXT Name)

Description

ctdbConnect connects to a database. Before connecting a particular database, get its handle with the ctdbAllocDatabase function. The application must connect a database before doing any operation with tables.

To disconnect a database from session, use the functions ctdbDisconnect or ctdbDisconnectAll.

Returns

ctdbConnect returns CTDBRET_OK on success, or the c-tree Plus error code on failure.

Example

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

See also

ctdbAllocDatabase, ctdbDisconnect, ctdbDisconnectAll, ctdbCreateDatabase


FairCom Corporation
www.faircom.com