Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
virtual P6R::P6ERR P6R::p6IDBC::connect ( const P6WCHAR pURI,
P6DBCRESULT  pfn,
P6VOID pCtx 
)
pure virtual

Open a connection to the database at the 'pURI' location.

Sqlite databases are created in the directory: "../data/db", the location of the data directory is defined in the server documentation.

Parameters
pURI[ in ] The URI defines the underlying database to use. Currently supported URIs include: 'sqlite3://filename', 'sqlite://:memory:', and 'postgresql8://user-name/password/hostname/hostaddr/port/database-name', where "sqlite3" and "postgresql8" are the database 'schemes'.
pfn[ in ] Pointer to a callback function to be invoked once the connection is complete or has failed. If set to NULL, then the call is blocking, otherwise it returns immedately with a "eOk" result and a call to this function will happen sometimes in the future.
pCtx[ in ] Can be NULL, pointer to a context that is passed to the pfn callback once the connection result is known. This memory is allocated and freed only by the caller.
Returns
SuccessP6R::eOk 
FailureP6R::eNoMemoryInsuffficient memory to properly initialize the component
P6R::eNotInitializedA call to initialize() has not been made.
P6R::eNotFoundThe 'scheme' in the pURI parameter does not match to any known database implementation.
P6R::eInvalidURIInvalid URI format, or rest of URI does not match scheme
P6R::eNotSupportedThe database implementation does not support one of the settings in initialize (e.g., a non-NULL pPath parameter)