Forum Discussion
Access ODBC does not recognize automatic client reroute
What that tells us, then, is that this is not a viable method for ODBC Access connections. It also tells you that using db2cli is a different environment where it does work.
I would, therefore, look at an alternate approach which doesn't rely on trying to use this approach as is.
What I would do instead is create a function in VBA that tries to connect to your primary database using the default parameters. If that succeeds, you should then be able to proceed on to work because Access will cache that successful connection for the remainder of the session. However, if it fails in this function, your code would then try the alternate connection. Again, if that succeeds, you are good to go. In other words, instead of trying to make the fall-back inside one config and ini, create two versions and let Access try them in turn before settling on the one to be used for a given session.
Look at this discussion (which uses MySQL) for a pattern that could be modified to this purpose.
I realize that it's less than ideal, but sometimes getting the job done takes precedence.
- bubba35Aug 31, 2021Copper ContributorWow, very good stuff there. Thanks George, I will look into this option.