9

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?

john2x
  • 22,546
  • 16
  • 57
  • 95
  • The DB Provider should supply an appropriate 32 or 64 bit driver and there is no reason why a 32 bit driver will not work on windows 7 64 bit. – Matt Wilko Jul 19 '11 at 10:09

3 Answers3

23

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.

Scott Kramer
  • 1,711
  • 3
  • 24
  • 37
2

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.

David Heffernan
  • 601,492
  • 42
  • 1,072
  • 1,490
0

As mentioned above:

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