SETLOGPATH Set transaction processing control file paths for single-user applications. Short Name SETLOGPATH() Type Low-level function Declaration COUNT SETLOGPATH(pTEXT path, NINT mode) Description SETLOGPATH() sets the path for the transaction processing log files, start files and temporary support files for single-user transaction processing applications. SETLOGPATH() must be called BEFORE the initialization of c-tree Plus (i.e., before InitCTree(), InitISAM(), etc...). Therefore, it does not set uerr_cod. It returns the error code or zero if successful. If c-tree Plus is shutdown and restarted within an application, SETLOGPATH() must be repeated just prior to each c-tree Plus initialization. If ctNOGLOBALS is used with instance control functions, the instance must be registered by calling RegisterCtree() before SETLOGPATH() is called. Each SETLOGPATH() call applies to only one instance of c-tree Plus.
These modes apply only to the optional mirrored log files and start files:
The simplest approach is to call SETLOGPATH() with the mode ctlogALL. Unless mirrored logs are desired, this is the only call required. If mirror files are desired then a second call with mode ctlogALL_MIRROR will handle all the mirrored files. The other modes are provided for unusual situations in which individual files must be placed in different locations. If the ctlogALL mode is not used, typically more than one call to SETLOGPATH() is required. A call made by a c-tree Server client to SETLOGPATH() returns zero, but has no effect. The c-tree Server configuration file specifies the modified names for the log and related files. However, a LOCLIB call to SETLOGPATH() sets the names for the local log files. Return
See c-tree Plus Error Codes for a complete listing of valid c-tree Plus error values. Example NINT rc;
printf("Could not setup log file names (%d)\n",rc);
|
|||||||||||||||||||||||||||||||||||||