KI_INITIALISE

Initialise a table

Synopsis:
CALL KI_INITIALISE handle, [eOpt] TO status
status = 'ki_initialise( handle, [eOpt] )
ArgumentEnumerationPurpose
handleHandle opened in "X" or "U" mode
eOptKDB_INITIALISE_ENUM
statusKDB_ERROR_ENUMReturn status
>KI_INITIALISE

KI_INITIALISE

This call will truncate a table to zero rows. The table should have been opened by KI_OPEN in "X" or "U" modes to guarantee success.

To improve performance on SQL databases KI_INITIALISE is implemented as TRUNCATE, however if it is called within a transaction the it will DELETE all the rows in the table.

On SQL databases if the table is not open in "U" mode then initialize will check for long term locks outstanding on the table and fail if any exist.

History
Introduced in KCML 3.00
See Also:
KI_CLOSE, KI_CLOSE_TABLE, KI_COPY_TABLE, KI_CREATE, KI_CREATE_TMP, KI_DB_NAME, KI_DELETE_ROWS, KI_DROP_TABLE, KI_EXTEND, KI_GET_HANDLE, KI_GET_SERIAL, KI_GROW, KI_INFO, KI_LOCK_ALL, KI_LOCK_OWNER, KI_MOVE_ROWS, KI_MOVE_TABLE, KI_OPEN, KI_PREFETCH_ROWS, KI_READ, KI_READ_HOLD, KI_READ_HOLD_NEXT, KI_READ_HOLD_PTR, KI_READ_NEXT, KI_READ_PTR, KI_READ_RAW, KI_REBUILD, KI_RESET_CACHEID, KI_REWRITE, KI_SET_DATESTAMP, KI_SET_EXTENT, KI_SET_ROWS, KI_SET_SERIAL, KI_SET_TIMESTAMP, KI_SET_USERSTAMP, KI_SET_WLOCK_COUNT, KI_SIZE_FILE, KI_START, KI_START_BEG, KI_UNLOCK, KI_UNLOCK_FILE, KI_VERIFY, KI_WMODE_BITMAP, KI_WRITE, KI_WRITE_PTR, KI_WRITE_RAW, KI_WS_CREATE, KI_WS_DELETE, KI_WS_OPEN, KI_WS_READ, KI_WS_REWRITE, KI_WS_WRITE
KCML database status codes