Product Documentation

FairCom ISAM for C

Previous Topic

Next Topic

Local Library Support

In addition to connecting to multiple FairCom Servers, it is possible to connect a client side application to a local FairCom DB single-user, (NOTFORCE), or Standalone Multi-user, (FPUTFGET), library. This feature is made possible by the ctLOCLIB define discussed in ctoptn.doc, in your root FairCom DB directory and will open the door to many sophisticated application uses, for example, moving data from a local machine to a FairCom Server machine.

During program execution, your logic must establish a separate FairCom DB instance for each local and/or FairCom Server connection with the RegisterCtree() instance function. The five FairCom DB instance functions documented in the function reference section are:


Register an instance to FairCom DB.


Unregister an instance from FairCom DB.


Make the supplied registration ID active.


Change to the next registered instance.


What is the current FairCom DB instanceID.

The enhanced ctNOGLOBALS support allows an application to establish multiple “instances” of FairCom DB. A FairCom DB instance can direct file I/O to either local c‑tree files or Server based files. It is possible to have multiple instances of both local and/or Server based FairCom DB files in the same application. FairCom DB distinguishes between local and Server calls based on the “user profile” used by the extended FairCom DB initialization calls, (InitCTreeXtd(), InitISAMXtd(), and OpenISAMXtd()). When the profile mode is OR-ed with USERPRF_LOCLIB, the initialization call establishes a local connection. For implementation instructions and a good working example of this logic, consult the sample program ctlxmg discussed in ctlxmg - LOCLIB Sample Program.