READ_ONLY configuration variable

This variable establishes the default read/write permission for all the files belonging to the associated DSN. By default, this variable is set to 0 (off, false, no), indicating that users can write to the files. Specify 1 (on, true, yes) if you want to make the files read-only.

What you indicate for read/write permission here applies to all files in the data source. If you want to assign different permissions to any individual files, you can do so using file aliases. See Setting Up File Aliases for more information on file aliases.

File (table) level read/write protection can also be defined by granting object privileges to specific users or to the PUBLIC user. You do this with the SQL GRANT (Object Properties) statement. For example, to make a table read-only to all users, you could issue the following command using xdbcquery. See Using the Command-line Query Tool for information about this tool.


Field (column) level read/write protection can be further defined using the READ-ONLY directive.

Note: When executing a SELECT statement, AcuXDBC opens indexed files as INPUT regardless of how this variable is set. When the user attempts to update a row (from Microsoft Access, for example), if the READ_ONLY configuration variable is off, AcuXDBC attempts to open the indexed file for update. If the COBOL program has the record locked during a AcuXDBC SELECT, and that record has met the SELECT conditions, a locked record condition occurs. When the COBOL program updates a record previously retrieved during a AcuXDBC, the update takes effect. When AcuXDBC attempts to update the record, an error occurs indicating that the record has been changed by another process after the original AcuXDBC SELECT.