KI_GET_SERIAL
Argument | Enumeration | Purpose |
---|---|---|
handle | Table handle | |
serial | Serial number | |
status | KDB_ERROR_ENUM | Return status |
nCache | Cache size |
KI_GET_SERIAL
KDB
This routine is used to return a unique serial number for the table opened on the specified handle and increment it so that a subsequent call will return one greater.
To improve performance in multi-table updates, if the handle is negative KCML assumes that this is part of a transaction and will not reload or save the controls block for the handle. A previous operation in the transaction must have referenced the handle with a lock, e.g. 'KI_READ_HOLD, and a later operation must update it, e.g. a call to 'KI_REWRITE.
ki_status will be set to KE_BADFUNCTION if auto-incrementing mode is in effect as modes should not be mixed.
SQL DB
This routine returns the current value of auto-incrementing serial for the given table.
The serial number for a handle can be reset with a call to 'KI_SET_SERIAL.