A central registry

You can specify the sqlhosts information in one of the following locations:
  • The local registry is the registry that is on the same Windows™ computer as your application.
  • The central registry is a registry that two or more applications can access to obtain sqlhosts information.

The central registry can be on the Domain Server or on any Windows workstation on the Microsoft™ network. It might be local to one application and remote to all others. A central registry enables you to maintain a single copy of the sqlhosts information for use by all applications in Windows environments.

To use a central registry, you must set the ONEDB_ SQLHOSTS environment variable on your computer. This environment variable specifies the name of the computer where the central registry is. To set this environment variable, you can use Setnet32, the ifx_putenv() function (Set and retrieve environment variables in Windows environments), or the InetLogin structure (The InetLogin structure).

In a Windows environment, the application uses the following precedence to locate sqlhosts information when it requests a connection:
  1. The sqlhosts information in the central registry, on computer that the ONEDB_ SQLHOSTS environment variable indicates (if ONEDB_ SQLHOSTS is set)
  2. The sqlhosts information in the local registry