Products Support Documentation Download
Collaboration diagram for Cleanup Functions:

Functions

RDM_RETCODE rdm_dbClose (RDM_DB db)
 Close the database associated with a database handle. More...
 
RDM_RETCODE rdm_dbFree (RDM_DB db)
 Free a database handle. More...
 

Detailed Description

Cleanup API for the core database. All the fuctions here are located in RDM DB Engine Library. Linker option:

    -lrdmrdm

Function Documentation

◆ rdm_dbClose()

RDM_RETCODE rdm_dbClose ( RDM_DB  db)

#include <rdmdbapi.h>

Close the database associated with a database handle.

This function will close the database associated with the specified database handle. If the database has a transaction active the transaction will be aborted. If there are any cursors associated with the database they will be automatically freed and no longer valid.

After the database is closed the handle can be reused by associating it with another database through one of the database open calls. If you are finished with the database handle you can should call rdm_dbFree() to free the resources associated with the handle.

Return values
sOKAYNormal, successful return.
eDBNOTOPENDatabase not open.
sTRABORTEDTransaction was aborted by system.
See also
rdm_dbOpen
rdm_dbFree
Parameters
[in]dbA valid RDM database handle
Examples:
tutorials/HelloWorld/hello_worldTutorial_main.c.

◆ rdm_dbFree()

RDM_RETCODE rdm_dbFree ( RDM_DB  db)

#include <rdmdbapi.h>

Free a database handle.

This function will free a database handle. If the database handle has a database open then the database will be automatically closed prior to freeing the handle. The rules for closing a database apply when you are directly freeing a handle. If the database has a transaction active the transaction will be aborted. If there are any cursors associated with the database they will be automatically freed and no longer valid.

After the handle has been freed it can no longer be used.

Return values
sOKAYNormal, successful return.
See also
rdm_tfsAllocDatabase
rdm_dbClose
rdm_cursorFree
rdm_tfsFree
Parameters
[in]dbA valid RDM database handle
Examples:
tutorials/HelloWorld/hello_worldTutorial_main.c.