Product Documentation

c-treeDB API API for C

Previous Topic

Next Topic

ctdbClearField

Clear the field data and set the field's NULL flag.

Declaration

CTDBRET ctdbClearField(CTHANDLE Handle, NINT FieldNbr)

Description

ctdbClearField() clears the field data and sets the field's NULL flag.

  • Handle [in] the record handle.
  • FieldNbr [in] the field number.

Note: this function only edits a single field in a single record/row.

Additionally, ctdbClearField() also sets the NULL flag. To clear the NULL flag, write a value to the field in its relevant record, even if it is a zero-length string.

Returns

ctdbClearField() returns CTDBRET_OK on success, or c-treeDB API error code on failure.

See also

ctdbClearRecord, ctdbIsNullField

To read/write the "NOT NULL" attribute of a column in the SQL layer, see ctdbGetFieldNullFlag and ctdbSetFieldNullFlag

TOCIndex