Thursday, March 10, 2011

Windows 7 SP1 Introduces Breaking Changes to MDAC

Wow, this one really took our office by surprise. A few of us here have updated to Windows 7 SP1. Some of the developers are also charged with maintaining some legacy VB6 applications that used ADODB to work with MS SQL Server databases.

If you compile this legacy code on Win7SP1, it will work *only* on Win7SP1 - any down stream OS versions will get some bad-juju runtime errors.

In short, it sounds like they made some changes to MDAC to make it play more friendly with x64 compilations, but in the process busted it for all older OSes. There's some work-arounds being discussed in the above post, but they have catches, like, if you update your legacy code (not that that's always a possibility,) you loose the ability to compile that code on non-Win7SP1 machines. The only surefire fix right now to not compile your legacy code on Win7SP1 - uninstall SP1 for now until an update is released.