Connecting to Oracle ODBC via Pyodbc (32-bit vs. 64-bit)

2.9k views Asked by At

I know similar questions have been asked before, and I still can't resolve my problem from looking at those Q's and their A's. Here is a similar problem.

My problem is this. At work, I have the following:

  1. Windows machine (64 bit)
  2. Python (64 bit)
  3. Pyodbc module (64 bit)
  4. Oracle ODBC driver (32 bit; only 32 bit can be used here)

When I execute the following line:

cnxn = pyodbc.connect(driver='{____}', dsn='____', uid='____', pwd='____')

I get the following error

Error: ('IM014', '[IM014] [Microsoft][ODBC Driver Manager] The specified DSN contains an architecture mismatch between the Driver and Application (0) (SQLDriverConnect)')

I have looked at odbcad32.exe file in both System32 and SysWOW64 folders. Both files contain the same information, as in both exe files show 32-bit Oracle driver.

What else can I do?

1

There are 1 answers

0
DavidH On

As Bryan Eargle suggested above, keep 64-bit windows, but make the rest all 64-bit or 32-bit. I have Python, Pyodbc, and Oracle ODBC all in 32-bit, and they are now talking to each other.