john2x
john2x

Reputation: 23634

Use 32-bit version of ODBC on 64-bit Windows 7?

I'm having problem with ODBC and an application written with Visual Basic 6 (so it's 32-bit). It seems that the ODBC library of VB6 is not compatible with the 64-bit ODBC of Windows 7.

The error code returned is -2147220992 and it's rambling about incompatible architectures.

Can I install a 32-bit version of ODBC? Or any other alternatives?

Upvotes: 9

Views: 62253

Answers (3)

Brandon Doyle
Brandon Doyle

Reputation: 1

As mentioned above:

C:\windows\SysWow64\odbcad32.exe is the location for the 32-bit version of the ODBC Administrator.

Upvotes: 0

Scott Kramer
Scott Kramer

Reputation: 1731

use the 32-bit odbc manager to add your DSN:

C:\Windows\SysWOW64\odbcad32.exe

that should be able to see the 32-bit odbc driver.

Upvotes: 23

David Heffernan
David Heffernan

Reputation: 612794

You need to use the 32 bit version of ODBC. You can't mix 32 and 64 bit code in the same process.

However, that may not be your problem. That error code is, I think, CONNECT_E_NOCONNECTION and there could be all sorts of reasons why you get that, and no necessarily down to 32/64 bit driver issues. For example, did you define the ODBC connection (DSN) with 32 bit admin tools?

Finally, I would recommend that you quote precise error messages rather than using phrases like "rambling about incompatible architectures". Precise information will help track down the problem.

Upvotes: 2

Related Questions