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 functions here are located in RDM DB Engine Library. Linker option:
-l
rdmrdm
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
-
sOKAY Normal, successful return. eDBNOTOPEN Database not open. sTRABORTED Transaction was aborted by system.
- See also
- rdm_dbOpen
- rdm_dbFree
- Parameters
-
[in] db A valid RDM database handle
- Examples
- core01Example_main.c, core12Example_main.c, core18Example_main.c, core34Example_main.c, core35Example_main.c, core36Example_main.c, core37Example_main.c, core38Example_main.c, cpp55Example_main.cpp, learn/bookStore_client.c, learn/bookStore_embed.c, learn/bookStore_vxWorks7.c, and tfs/rdmAllocDatabase.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
-
sOKAY Normal, successful return.
- Parameters
-
[in] db A valid RDM database handle
- Examples
- core01Example_main.c, core08Example_main.c, core09Example_main.c, core12Example_main.c, core15Example_main.c, core16Example_main.c, core17Example_main.c, core18Example_main.c, core19Example_main.c, core31Example_main.c, core32Example_main.c, core33Example_main.c, core34Example_main.c, core35Example_main.c, core36Example_main.c, core37Example_main.c, cpp50Example_main.cpp, cpp55Example_main.cpp, cpp70Example_main.cpp, learn/bookStore_client.c, learn/bookStore_embed.c, learn/bookStore_vxWorks7.c, tfs/rdmAllocDatabase.c, and tfs/rdmAllocTFS.c.