Although these modes are specified when opening or creating a file, they affect how the FairCom Server handles record locks. If specified at file creation, these mode values become a permanent part of the file attributes.
ctCHECKLOCK
If added at file open or create, FairCom DB requires a record lock before a record can be updated. If a lock is not obtained, the error code DADV_ERR (57) is returned. Do not apply this file mode to index files.
ctCHECKREAD
As above, except that it applies to record reads instead of updates. Obtain at least a read lock on a record before it can be read, otherwise the function will return error code DADV_ERR (57). Do not apply this file mode to index files.
Note: ctCHECKLOCK and ctCHECKREAD are intended as debugging aids to help developers to identify code locations where locks are not being acquired.
ctCHECKREAD is not compatible with ctSUSPEND by definition because ctSUSPEND will disable record lock acquisition without releasing existing locks, so any record read would then trigger the ctCHECKREAD error condition.
ctCHECKLOCK and ctCHECKREAD should not be applied to index files.
See also: