Product Documentation

FairCom ISAM for C

Previous Topic

Next Topic


Pass additional file open modes to FairCom Server.


NINT SetXtdFileOpenMode (LONG mode)


Additional file open modes can be passed to FairCom DB using this function. SetXtdFileOpenMode() sets a file open mode that is used by the OPNIFIL, OPNIFILX, OPNRFIL, and OPNRFILX functions.

Note: c-tree passes the extended file open mode value to the c-tree Server on the next call to OPNIFIL, OPNIFILX, OPNRFIL, or OPNRFILX that is made after calling SetXtdFileOpenMode(). These ISAM-level file open functions always reset the extended file mode, even in case of error, so that the extended file mode only applies to the first ISAM-level file open call that is made after the call to SetXtdFileOpenMode().

Extended file open modes set by SetXtdFileOpenMode()


Open with read-only sharing.


Inter-thread file locking hierarchy based on most restrictive co-file open


Read/write open of replicated file for administrative purposes


Allows opening files when update callback cannot be loaded (see below)

Opening a data file if its record update callback resource DLL cannot be loaded

A c-tree data file that requires a record-update callback DLL would fail to open with error code 981 if the callback DLL could not be loaded. In some cases, it might be desirable to allow the data file to be opened in this situation. This is now permitted.

An extended file open mode has been added. It can be used to permit the data file to be opened for read-only access if its record-update callback DLL cannot be loaded. The new extended file mode is ctXOPN_NORUCB_OK. To use this mode when opening the file, call SetXtdFileOpenMode(ctXOPN_NORUCB_OK) before opening the file.

Note that the extended file mode set by SetXtdFileOpenMode() overwrites any previous extended file mode that was set for the connection. Upon return from the file open call, the extended file mode is reset to zero. This implies the normal usage of this function is to call it right before opening the file.

Note: Although the file open succeeds in this situation, the file open function sets sysiocod to RUCBDLL_NOT_LOADED_COD, and a message such as the following one is logged to CTSTATUS.FCS indicating the failed DLL load:

CTDLL_LOAD: Failed to load module ctuser.dll: The specified module could not be found.