x86 ODBC Driver on x64 OS and the Data Access Block

Topics: Data Access Application Block
Jul 14, 2010 at 12:01 PM
Hi Guys, I'm running an application which uses the EntLib4.1's data block to connect to a Sybase ASE 12.5 database. All works well on my development machine (32 bit), but when I attempt to run it on a 64 bit server (Windows Server 2k8 R2), an exception is thrown (see below for exception message). The driver is installed, but it's 32 bit. I can view and test the ODBC connection through the "%windir%\syswow64\odbcad32.exe" tool, but it seems that the EntLib only looks for the 64 bit drivers. Is there a configuration setting within the entlib / simple workaround for this, or do I need to start looking for alternate ODBC drivers? Thanks in advance, JB Exception Message: System.Data.Odbc.OdbcException: ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified.
Jul 14, 2010 at 7:27 PM

64-bit applications cannot load 32-bit DLLs, which s what your ODBC driver is. You need to find a 64-bit driver or run your app in production as a 32-bit app.

This is a general Windows / .NET thing, not specific to Entlib.


Jul 17, 2010 at 1:13 PM

Thanks for you help.  On compiling my app as x86 rather tha Any CPU, all worked perfectly.

Apologies for posting the question here; since I wasn't sure where in the stack things were failing, I figured this was the best place to start.

Thanks again,