So all of the sudden this line started failing:
SQLConfigDataSource(WinHandle, (int)RequestFlags.ODBC_CONFIG_DSN, "Timberline Data", connStrIn);
With this message:
---------------------------
Microsoft ODBC Administrator
---------------------------
The setup routines for the Timberline Data ODBC driver could not be found. Please reinstall the driver.
---------------------------
OK
---------------------------
But it just worked yesterday!!!! So I re installed the drivers and reran the code. And it still fails.
So what did I change? Well after a few hours we found out the problem.
Visual Studio Platform Target.
Typically best practices are to use AnyCPU but for some reason we noticed this app was on x86. We promptly changed it to Any CPU. Well that was the reason for the failure.
The ODBC driver we are trying to use does not have a 64bit version. So when I built and executed on my 64 bit development machine it chose the 64bit ODBC driver. When I select x86 I get the 32bit ODBC driver.
I confirmed this by using the two ODBC Administrator tools in windows.
The 32 bit one allowed me to config and the 64 bit one raises the exact same error as my application.