Product Documentation

FairCom DB API for C

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.

Declaration

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

Description

If both create and update are set to NO, the automatic assignment is turned off.

  • Handle [IN] - Field handle
  • create [IN] - the field value is assigned on write of new records
  • update [IN] - the field value is assigned on write 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