cursor/printChildNamesForMother.c
static
RDM_RETCODE
printChildNamesForMother (
RDM_CURSOR
mother)
{
RDM_RETCODE
rc;
char
name[32];
RDM_CURSOR
children = NULL;
rc =
rdm_cursorGetMemberRows
(mother, REF_MOTHERS_CHILDREN, &children);
if
(rc ==
sOKAY
)
{
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);
}
}
if
(rc ==
sENDOFCURSOR
)
rc =
sOKAY
;
rdm_cursorFree
(children);
return
rc;
}