1.7.7 About the lock error retry and trial-open functions
The lock error retry function retries to access files and folders when a lock error# occurs during execution of a command or statement that accesses files and folders.
The trial-open function tries to open the file immediately after the TextClose command is executed to close a file to which data was written by the TextOpen command. This confirms that the data has been written to the disk.
Because typical Windows file systems use a disk write cache, a disk write delay might occur at the device level. Therefore, if a disk write delay has occurred, an attempt to execute the command or statement that accesses files and folders might fail due to a lock error. The lock error retry function and the trial-open function allow you to recover errors caused by a disk write delay during execution of a command or statement.
Note: A lock error code has occurred if either of the following error codes is output:
-
0032: A process cannot access a file because another process is using the file.
-
0005: Access was denied. Recheck file attributes or security.
For details on the lock error retry function, see 2.4.5 Setting lock error retry function and 9.9.2 SetRetryMode (set the lock error retry function).
For details on the trial-open function, see 2.4.6 Setting trial-open function and 9.9.4 SetTrialOpenMode (set the trial-open function).