Indicates that dbopen can connect to a fallback server if an attempt to connect to a primary server fails.
RETCODE DBSETLFALLBACK (
PLOGINREC ploginrec,
LPCSTR pstatus );
where
SUCCEED or FAIL.
Call the DBSETLFALLBACK function to indicate that a fallback server can be used by a subsequent call to dbopen. When successfully connected to the primary server, the dbopen function automatically determines the current fallback server and verifies that the fallback information is stored in the registry. You must call the DBSETLFALLBACK function before you call the dbopen function. If the attempt to connect to the primary server fails, dbopen attempts to connect to the fallback server.
Setting pstatus to "ON" or "OFF" determines whether fallback support is available during subsequent calls to dbopen.
For DBSETLFALLBACK to function properly, the connection timeout set by calling dbsetlogintime or DBSETLTIME must be a value greater than 0.
In this example, DBSETLFALLBACK specifies that fallback support is enabled prior to a call to dbopen.
DBSETLFALLBACK(loginrec, "ON"); dbproc = dbopen(loginrec, "my_server");