Retrieval and Update Locks

If any process, such as a TCL command or a FlashBASIC program is executed from an account that does not have retrieval and/or update privileges for a file, and then attempts to read and/or write to that file, the process terminates with an error message indicating that the file is access protected.

To read from or write to a retrieval/update protected file, the retrieval and update lock codes must match those of the file that is opened. This is a system function and cannot be accomplished from FlashBASIC. If the file is retrieval protected, the file cannot be opened and the program terminates.

Example(s)

At TCL, message [210] above displays if payroll is access protected.

list payroll

[210] File ’payroll’ is access protected.

If a file called payroll has an access retrieval lock that does not match the lock codes (keys) for the current user, the statement aborts the program with message [210].

file payroll

[210] in program ’enter-payroll’, File ’payroll’ is access protected.

If the file is access protected, the else clause is taken and message [201] displays.

open ’payroll’ to payroll.file else stop 201,’payroll’

[201] ’payroll’ is not a file name.

See Also

create-account Command, File Lock Codes, Locks, Retrieval Locks, retrieval-lock, ulk, users File