Product Documentation

FairCom DB API for C

Previous Topic

Next Topic

Clearing the record buffer

Call ctdbClearRecord() to clear the record handle. The record buffer is cleared, the full bit flag for all fields are cleared, the new record flag is set to false, the edited record flag is cleared, and the record offset is set to zero.

/* clear the record buffer */

if (ctdbClearRecord(hRecord) != CTDBRET_OK)

printf("Clear record failed\n");

Previous Topic

Next Topic

Clearing a field

A field can be cleared, and its null field flag set, by calling ctdbClearField(). Call ctdbIsNullField() to check if a field null flag is set.

/* if a field 0 is not null, clear the field */

if (ctdbIsNullField(hRecord, 0)

ctdbClearField(hRecord, 0);

TOCIndex