Question

I'm having trouble with the following:

We have a 32bit Postgres Server here in the office. I'm developing an application in Visual Studio 2013, in a 64bits Windows 8. When I run the application, I get the following error:

ERROR [IM014] [Microsoft][ODBC Driver Manager] The specified DSN contains an architecture mismatch between the Driver and Application

I have both drivers installed (32 and 64 bits) for ODBC, but my 64bits driver, when I try to connect through VS to the server, it throws the same error as above, and only the 32bits driver can connect through VS.

In VS2013,I can see the Tables and configuration of the server, but when I run, more specific, in the Connection.Open() part, the previous exception is thrown.

Can somebody help me? (Sorry about the English mistakes...)

Was it helpful?

Solution

Most Visual Studio application builds are 32-bit, even when installed on 64-bit Windows.

If your Visual Studio is 32-bit you must use the 32-bit ODBC driver for ODBC communication being done within Visual Studio its self.

You can (and must) still use the 64-bit ODBC driver when doing ODBC communication from 64-bit applications compiled in Visual Studio.

You could also be compiling and running a 32-bit application, even though you're on 64-bit Windows, in which case you must use the 32-bit ODBC driver with it.

Fun, no?

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top