cursor/printAdults.c
{
ADULT fAdult;
RDM_CURSOR adultsIter = NULL;
RDM_RETCODE rc;
/* Clone adults so we can leave its position as is */
rc = rdm_cursorGetClone (adults, &adultsIter);
{
rc = rdm_cursorMoveToFirst (adultsIter);
}
while (rc == sOKAY)
{
if (rc == sOKAY)
{
printf (
"Adult with id: %d and name: %s\n", fAdult.adult_id,
fAdult.adult_name);
rc = rdm_cursorMoveToNext (adultsIter);
}
}
if (rc == sENDOFCURSOR)
rc = sOKAY;
rdm_cursorFree (adultsIter);
return rc;
}
RDM_RETCODE rdm_cursorReadRow(RDM_CURSOR cursor, void *colValues, size_t bytesIn, size_t *bytesOut)
Read all columns from a row.
RDM_RETCODE rdm_cursorGetClone(RDM_CURSOR sourceCursor, RDM_CURSOR *pCursor)
Associate an RDM_CURSOR as a clone of an existing RDM_CURSOR.