FairCom ISAM for C

Previous Topic

Next Topic

Multi-User File Mode

The following file modes are related to multi-user file mode:

  • ctSHARED

When c-tree is used in a network or multi-tasking environment, it is necessary to specify whether individual files are shared among the users or opened exclusively for one user. File modes can also specify whether the FairCom DB Server should check for proper lock ownership. How to use these modes is explained in detail in Multi-User Concepts and FairCom DB Server. The ctCHECKLOCK and ctCHECKREAD file modes should not be applied to index files.

Important: Note the following sequence regarding the ctCHECKLOCK mode:




At first, one might expect RWTREC() would fail because the call to FRSREC() did not lock the record. However, because TRANBEG() set the ISAM lock mode to ctENABLE, RWTREC() acquired a write lock on the record before checking if it was locked.

This is important to be aware of, as it means that in this type of situation, although an application uses ctCHECKLOCK, it could have read a record without a lock and then updated the record, even though another client might have changed the record before the lock was acquired on the update.