Using SqlOpen to Connect to a Fallback Server

If an attempt to connect to a primary server fails, SqlOpen can attempt to connect to a fallback server. You must call the SqlSetLFallback function to indicate that a fallback server can be used. The call to the SqlSetLFallback function must occur before the call to the SqlOpen function.

Each call to the SqlSetLFallback function from a machine running Windows NT or Windows 95 updates the fallback information in the local registry from the SQL Server registry. Fallback information is stored in the WIN.INI file on machines running 16-bit Windows. The SqlOpen function retrieves the fallback information from the local registry or from the WIN.INI file.

When SqlOpen attempts to connect to a fallback server, DB-Library generates warning message 10110 (DBECONNFB):

Unable to connect: SQL Server is unavailable or does 
not exist -- will attempt a fallback connection.
  

See Also

SqlSetLFallback