Friday, December 11, 2009

ODBC on x64 (MDAC x86)

Note to self:

When developing with old components and receiving wierd messages, try compiling for x86 and running. Chances are, if the code can't see a GAC'd dll, it's because you're running in x64 and the 'missing' component is compiled for x86.

This occurred when attempting to use the Microsoft Text Driver from an x64 machine. The ODBC Data Sources dialog doesn't show all the (x86) drivers installed...that is unless you run it from an x86 command prompt. So I thought I had to install MDAC 2.8, but even after doing that, the code was still choking.

I also ran into this while working on a project that required the SQL Server Replication components, which are also compiled for x86. Fortunately, my brain was switched on today.

No comments:

Post a Comment