Product Documentation

Automatic Data Aggregation

Previous Topic

Next Topic

ctdbSetFieldAutoSysTime()

Set field attributes for automatic time/datetime assignment. If both create and update are set to NO automatic assignment is disabled.

CTDBRET ctdbDECL ctdbSetFieldAutoSysTime(CTHANDLE Handle, CTBOOL create, CTBOOL update)

Parameters:

  • Handle [IN] - Field handle
  • create [IN] - The field value is assigned on write of new records.
  • update [IN] - The field value is assigned on update of existing records.

Returns:

CTDBRET_OK on success or c-tree error code on failure.

Example:

CTDBRET Retval = CTDBRET_OK;

CTHANDLE pField1;

Retval = ctdbSetFieldAutoSysTime(pField1, YES, NO);

if (Retval)

{

ctrt_printf("Error: ctdbSetFieldAutoSysTime(1) failed:%d\n", Retval);

goto err_ret;

}

TOCIndex