Precedence of configuration values

When a client application in a Windows™ environment requires configuration information, HCL OneDB™ ESQL/C obtains it from the following locations:
  1. The InetLogin structure

    If the application uses the InetLogin structure, HCL OneDB ESQL/C first checks for configuration information in this structure. (To set the value of an environment variable for the application process, the ifx_putenv() function changes the value of an InetLogin field.)

  2. The INFORMIX subkey of the Registry

    If the application has not set the configuration information you want in InetLogin, HCL OneDB ESQL/C checks for this information in its copy of the Registry information. For more information about how to set the Registry, see the HCL OneDB Client Products Installation Guide.

You do not need to define all the values in the InetLogin structure. The application uses the configuration information in the Registry for any values it cannot find in InetLogin. If you do not set the corresponding Registry value, the application uses its default value.
Important: The first time that the application requires configuration information, HCL OneDB ESQL/C reads this information from the Registry, and stores it in memory. For subsequent references to Registry information, HCL OneDB ESQL/C accesses this in-memory copy and does not reread the Registry.
This hierarchy of configuration information is valuable if, for example, you want the application user to provide a user name and password at run time, or if an application has some configuration information that differs from the general values in the Registry. For example, suppose the application sets the ConRetry field of InetLogin to 2 but does not set the ConTime field, as the following code fragment shows:
strcpy(InetLogin.ConRetry, "2");
EXEC SQL connect to 'accnts';
When HCL OneDB ESQL/C establishes the connection to the accnts database, it tries to establish the connection twice (instead of the default value of once) but it still uses a connection time of 15 seconds (the default value from the in-memory copy of the Registry information). If Setnet32 has modified the connection values, HCL OneDB ESQL/C uses the modified Registry values instead of the default values.
Tip: Use the Setnet32 utility to define configuration information in the Registry. For more information about Setnet32, see the HCL OneDB Client Products Installation Guide.