Functions | |
RDM_RETCODE | rdm_dbAllocCursor (RDM_DB db, RDM_CURSOR *pCursor) |
Allocate a cursor. More... | |
Cursor initialization API for the core database. All the functions here are located in RDM DB Engine Library. Linker option:
-lrdmrdm
See RDM Cursor APIs for a more detailed description of a cursor.
RDM_RETCODE rdm_dbAllocCursor | ( | RDM_DB | db, |
RDM_CURSOR * | pCursor | ||
) |
#include <rdmdbapi.h>
Allocate a cursor.
This function allocates and initializes a cursor. The new cursor is associated with the specified database. Once a cursor has been initialized it can be used in other RDM_CURSOR function calls.
An allocated cursor is not associated with any rows. One of the association functions (rdm_dbGet*
, rdm_cursorGet*
, and rdm_dbInsert*
) need to be called to associate the cursor with a collection of rows. Most of the other cursor APIs will return an error if called with a cursor that is allocated but not yet associated with rows.
It is not necessary to explicitly allocate a cursor. The association functions will automatically allocate a cursor if the pCursor parameter is set to NULL prior to calling the association function.
sOKAY | Normal, successful return. |
eDBNOTOPEN | Database not open. |
eCURSORDB | Cursor is associated with a different database. |
ePRECOMMITTED | A precommitted transaction must be committed or rolled back before further operations on this database are allowed. |
[in] | db | A valid RDM database handle |
[out] | pCursor | The cursor to be allocated |
Referenced by RDM::TIME_SERIES::insert_row< table_id >::init().