cursor/changeAdultIdentity.c
static RDM_RETCODE changeAdultIdentity (
RDM_CURSOR adult,
const ADULT *newIdentity)
{
rc = rdm_cursorUpdateRow (adult, newIdentity, sizeof (ADULT));
if (rc == sOKAY)
{
printf (
"Changed identity to %d, %s\n", newIdentity->adult_id,
newIdentity->adult_name);
}
if (rc == sOKAY)
{
rc = rdm_cursorGetStatus (adult, &status);
}
/* How the following behaves depend on the cursor that is passed in */
if (rc == sOKAY && status == CURSOR_CHANGED)
{
printf ("The key value for the cursor used to change"
" the identity have changed\n");
}
return rc;
}
struct RDM_CURSOR_S * RDM_CURSOR
Definition: rdmtypes.h:347
@ sOKAY
Definition: rdmretcodetypes.h:100
RDM_RETCODE rdm_cursorGetStatus(RDM_CURSOR cursor, RDM_CURSOR_STATUS *position)
Check a cursor for special conditions.
RDM_CURSOR_STATUS
Enumeration for RaimaDB cursor positions / statuses.
Definition: rdmtypes.h:220
enum RDM_RETCODE_E RDM_RETCODE
RaimaDB status and error return codes.
RDM_RETCODE rdm_cursorUpdateRow(RDM_CURSOR cursor, const void *colValues, size_t bytesIn)
Update all columns in a row.
@ CURSOR_CHANGED
Definition: rdmtypes.h:227