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.
The issue is discussed in length at http://social.msdn.microsoft.com/Forums/en/windowsgeneraldevelopmentissues/thread/3a4ce946-effa-4f77-98a6-34f11c6b5a13
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.
Useful tidbits I gleaned:
- http://social.msdn.microsoft.com/Forums/en-US/windowsgeneraldevelopmentissues/thread/3a4ce946-effa-4f77-98a6-34f11c6b5a13/#97470aa6-1291-4d6a-bad2-90dc7ce52740 : LONG vs LONGLONG...heh.
- http://social.msdn.microsoft.com/Forums/en-US/windowsgeneraldevelopmentissues/thread/3a4ce946-effa-4f77-98a6-34f11c6b5a13/#1a89662b-f91f-4aef-a706-8fb4d762956d : Problem fully acknowledge, 'high priority'.
Update 2011-Apr-13:
- http://connect.microsoft.com/VisualStudio/feedback/details/646313/ado-programs-no-longer-work-on-customer-computers-after-recompiled-on-a-windows-7-sp1-machine Official bug report to MS about the issue - chime in if you're having the same problem!