tfs/rdmAllocDatabase.c
RDM_RETCODE exampleRdm_rdmAllocDatabase (const char *databaseName)
{
RDM_TFS tfs;
RDM_DB db;
rc = rdm_rdmAllocDatabase (&db);
if (rc == sOKAY)
{
rc = rdm_dbOpen (db, databaseName, RDM_OPEN_SHARED);
if (rc == sOKAY)
{
printf ("Database (%s) is open!\n", databaseName);
rc = rdm_dbClose (db);
}
rc = rdm_dbFree (db);
}
return rc;
}
RDM_RETCODE rdm_dbClose(RDM_DB db)
Close the database associated with a database handle.
@ sOKAY
Definition: rdmretcodetypes.h:100
RDM_RETCODE rdm_dbFree(RDM_DB db)
Free a database handle.
RDM_RETCODE rdm_dbOpen(RDM_DB db, const char *dbNameSpec, RDM_OPEN_MODE mode)
Open an existing RaimaDB database using the specified database handle.
enum RDM_RETCODE_E RDM_RETCODE
RaimaDB status and error return codes.
@ RDM_OPEN_SHARED
Definition: rdmtypes.h:289
struct RDM_TFS_S * RDM_TFS
RaimaDB TFS Handle.
Definition: rdmtfstypes.h:21
struct RDM_DB_S * RDM_DB
Definition: rdmtypes.h:346