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:304
@ sOKAY
Definition: rdmretcodetypes.h:96
RDM_RETCODE rdm_cursorGetStatus(RDM_CURSOR cursor, RDM_CURSOR_STATUS *position)
Check a cursor for special conditions.
RDM_CURSOR_STATUS
Enumeration for RDM cursor positions / statuses.
Definition: rdmtypes.h:206
RDM_RETCODE rdm_cursorUpdateRow(RDM_CURSOR cursor, const void *colValues, size_t bytesIn)
Update all columns in a row.
@ CURSOR_CHANGED
Definition: rdmtypes.h:213
RDM_RETCODE
RDM status and error return codes.
Definition: rdmretcodetypes.h:44