cursor/printChildNamesForMother.c
{
RDM_RETCODE rc;
char name[32];
RDM_CURSOR children = NULL;
rc = rdm_cursorGetMemberRows (mother, REF_MOTHERS_CHILDREN, &children);
{
rc = rdm_cursorMoveToFirst (children);
}
/* Iterate over all mothers children */
while (rc == sOKAY)
{
rc = rdm_cursorReadColumn (
children, COL_CHILD_CHILD_NAME, name, sizeof (name), NULL);
if (rc == sOKAY)
{
printf ("Child: %s\n", name);
rc = rdm_cursorMoveToNext (children);
}
}
rc = sOKAY;
rdm_cursorFree (children);
return rc;
}
RDM_RETCODE rdm_cursorGetMemberRows(RDM_CURSOR ownerCursor, RDM_REF_ID refId, RDM_CURSOR *pCursor)
Associate an RDM_CURSOR with members.
RDM_RETCODE rdm_cursorReadColumn(RDM_CURSOR cursor, RDM_COLUMN_ID columnId, void *columnValue, size_t bytesIn, size_t *bytesOut)
Read a single column from a table row.