KI_SET_USERSTAMP

Turn userstamping on/off

Synopsis:
CALL KI_SET_USERSTAMP handle, mode$ TO status
status = 'ki_set_userstamp( handle, mode$ )
ArgumentEnumerationPurpose
handleHandle
mode$"S"et or "U"nset userstamping
statusKDB_ERROR_ENUMReturn status
>KI_SET_USERSTAMP

KI_SET_USERSTAMP

Allows userstamping to be toggled on or off. For example:

CALL KI_SET_USERSTAMP handle, "S" TO status

turns userstamping on on the table currently open on handle. While

CALL KI_SET_USERSTAMP handle, "U" TO satus

turns userstamping off.

After userstamping has been turned on, the column specified in the USERSTAMP table parameter of CREATE TABLE will be automatically set to the username of the current user when updated by KI_WRITE, KI_REWRITE or KI_WRITE_PTR. Setting/unsetting userstamping on a table that already has it set/unset will have no effect and will not produce an error.

Userstamping is on by default when a table is opened by KI_OPEN.

The username is taken from the LOGNAME environemnt variable at the time of KI_CONNECT. It can be at most 20 characters long.

This function is only available for KDB and Oracle tables.

History
Introduced in KCML 6.00
See Also:
KI_CLOSE, KI_CLOSE_TABLE, KI_DB_NAME, KI_DROP_TABLE, KI_EXTEND, KI_GET_HANDLE, KI_GET_SERIAL, KI_INFO, KI_INITIALISE, KI_LOCK_ALL, KI_OPEN, KI_PREFETCH_ROWS, KI_REBUILD, KI_RESET_CACHEID, KI_SET_DATESTAMP, KI_SET_SERIAL, KI_SET_TIMESTAMP, KI_UNLOCK_FILE, KI_VERIFY
KCML database status codes