KI_WRITE
Argument | Enumeration | Purpose |
---|---|---|
handle | Handle | |
SYM(rowbuf$) | Symbol of row buffer | |
eLockType | KCML_KDB_LOCK_ENUM | Optional lock type |
status | KDB_ERROR_ENUM | Return status |
rowid$ |
KI_WRITE
This routine writes the row buffer to the table open on the handle as a new row and updates the indices appropriately. If the row already exists in the table and has been amended, then the correct call to use is KI_REWRITE. If the call fails, then the indices are not modified. The call might well fail with an error code of KE_DUPLICATE if one of the indices specifies no duplicates and the new rows data violates that constraint.
If the table has no indices, then the row is written with the next free rowid. If an autoincrementing column has been defined using KI_SET_SERIAL then this call will increment the tables serial after storing it in the column and writing the row.
If the lockflag is non-zero then the row will be written and left locked.
On an SQL database where views are enabled, the columns that are not in the view will be written using the values taken from the default row.