Products Support Documentation Download
Cursor Initialization Functions
Collaboration diagram for Cursor Initialization 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:


See cursor for a more detailed description of a cursor.

Function Documentation

◆ rdm_dbAllocCursor()

RDM_RETCODE rdm_dbAllocCursor ( RDM_DB  db,

#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
Return values
sOKAYNormal, successful return.
eDBNOTOPENDatabase not open.
eCURSORDBCursor is associated with a different database.
ePRECOMMITTEDA precommitted transaction must be committed or rolled back before further operations on this database are allowed.
[in]dbA valid RDM database handle
[out]pCursorThe cursor to be allocated