5.17 I'm trying to change(update) via QUERY the value of a critical item (key) in a TurboImage database. First thing I tried was DBUTIL with this command:

SET database name CIUPDATE = ALLOWED

and sure enough I got:

>> CIUPDATE is allowed.

However, when I run QUERY with the REPLACE command, I still get this message:

DBUPDATE attempted to modify value of critical item--key, search or sort 0 OF 1 QUALIFYING ENTRIES REPLACED

What is wrong?

There are three options in DBUTIL for CIUPDATE: DISALLOWED, ALLOWED, and ON. If you want to use QUERY, you want ENABLED. With ALLOWED, you need to programmatically call DBCONTROL to enable CIUPDATE.

From the manual: "The ALLOWED setting requires that a process first call DBCONTROL in mode 5 to enable the CIUPDATE option for the duration of the process or until a call to DBCONTROL in mode

6 disables the option. Using DBCONTROL modes 5 and 6 does not alter the permanent setting set with the DBUTIL >>SET command. The database must be opened in access mode 1, 3, or 4; and your user class must have write access at the set level, or both read access at the set level and write access at the item level."

The ALLOWED option provides a measure of safety, making it more difficult to accidentally update a key.