cursor/insertAdults.c
static RDM_RETCODE insertAdults (
const ADULT *adults,
uint32_t nAdults,
RDM_DB db)
{
RDM_CURSOR inserted = NULL;
uint32_t ii;
for (ii = 0; rc == sOKAY && ii < nAdults; ii++)
{
printf (
"Insert adults with id: %d and name: %s\n", adults[ii].adult_id,
adults[ii].adult_name);
/* We could pass in NULL instead of 'inserted' below */
rc = rdm_dbInsertRow (
db, TABLE_ADULT, &adults[ii], sizeof (ADULT), &inserted);
}
rdm_cursorFree (inserted);
return rc;
}
RDM_RETCODE rdm_dbInsertRow(RDM_DB db, RDM_TABLE_ID tableId, const void *colValues, size_t bytesIn, RDM_CURSOR *pCursor)
Insert a new row into a table at the specified rowId.