KI_SET_USERSTAMP
Argument | Enumeration | Purpose |
---|---|---|
handle | Handle | |
mode$ | "S"et or "U"nset userstamping | |
status | KDB_ERROR_ENUM | Return status |
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.