Cursor Initialization Functions

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

Collaboration diagram for Cursor Initialization Functions:

Functions

RDM_RETCODE rdm_dbAllocCursor (RDM_DB db, RDM_CURSOR *pCursor)
Allocate a cursor. More...

Detailed Description

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

    -lrdmrdm

See RDM Cursor APIs for a more detailed description of a cursor.

Function Documentation

rdm_dbAllocCursor()

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.

Locking Requirements
None
Return values
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.
Parameters
[in] db [in] A valid RDM database handle
[out] pCursor [out] The cursor to be allocated