KI_SET_MODE
| Argument | Enumeration | Purpose |
|---|---|---|
| connect | Database connection | |
| mode | New mode to be set | |
| oldMode | Previous mode | |
| status | KDB_ERROR_ENUM | Return status |
KI_SET_MODE
This function controls recovery and transactional modes. The mode bits are defined in this table.
| Mode bit | Purpose |
|---|---|
| 0x01 | Enable logging |
| 0x02 | Enable a transaction mode where locks are taken as requested by the program and unlocked at the end of the transaction, not by any KI_REWRITE or KI_UNLOCK |
| 0x04 | Take a system wide lock around a transaction |
| 0x08 | Take a database specific lock around a transaction |
| 0x10 | Error if a transaction is started when logging is disabled. |
| 0x20 | Rollback automatically on any KISAM error |
The previous mode bits are returned in oldMode.