Product Documentation

FairCom ISAM for C

Previous Topic

Next Topic

ctSetConfigurationOptions

Pass a server configuration file into an embedded database server model ("Server DLL").

Declaration

NINT ctDECL ctSetConfigurationOptions (const char *optionString);

Description

ctSetConfigurationOptions() passes a null-terminated string in the format of the server configuration file as used by the embedded database server model ("Server .DLL"). Each configuration option is followed by a newline.

Example 1:

NINT rc;

rc = ctSetConfigurationOptions("SERVER_NAME FAIRCOMS\nCOMM_PROTOCOL FSHAREMM\n");

Example 2:

This is a copy of the default ctsrvr.cfg file and note each line that starts with a semicolon (;) indicates this line is a comment and will be ignored by the FairCom Server parsing routine.

#define MY_CONFIG_FILE_OPTIONS "\

; FairCom DB ISAM Server Configuration File - v11.5.0.46433 Build(171113)\n\

CHECK_CONFIG YES\n\

\n\

; Server Name\n\

SERVER_NAME FAIRCOMS2\n\

;SERVER_PORT 5597\n\

\n\

; Location for data Files and Logs\n\

; LOCAL_DIRECTORY ./data/\n\

\n\

; End of File\n"

ctSetConfigurationOptions(MY_CONFIG_FILE_OPTIONS);

/* FairCom MT API: Please note #01 */

if ((err = ctThrdInit(3,(LONG) 0, (pctINIT)&cfg))) {

Return

NO_ERROR on success. c-tree error on exception.

TOCIndex