Connection only works with 32bit interpreter not with 64bit

68 views
Skip to first unread message

Thomas Becker

unread,
Apr 3, 2013, 12:12:33 PM4/3/13
to pyo...@googlegroups.com
Dear all, I'm a bit confused here...

I want to connect to an existing *.accdb file and it doesn't work when I use a 64bit interpreter. I installed pyodbc from the binaries here: http://www.lfd.uci.edu/~gohlke/pythonlibs/#pyodbc where I used the 64bit version for Python 2.7. yolk tells me that is is installed and active and the version number of pyodbc is 3.0.6.

When I try to connect with:

    con = pyodbc.connect("Driver={Microsoft Access Driver (*.mdb, *.accdb)};DBQ=K:\\pyTest.accdb;")

I'm getting the following error:

Traceback (most recent call last):
  File "C:\THOB\workspace\Toolbox\src\whales.py", line 79, in <module>
    con = pyodbc.connect("Driver={Microsoft Access Driver (*.mdb, *.accdb)};DBQ=K:\\pyTest.accdb;")
pyodbc.Error: ('IM002', '[IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified (0) (SQLDriverConnect)')

The thing with the 32bit interpreter is, that the exact same code works there.
In both cases the installed version of pyodbc is 3.0.6 only difference is once it is 32bit the other one 64bit.
The office suite installed on my system is MS Office 2010 in 32bit.

Can somebody help me out here? I can't simply take the 32bit interpreter because there are other parts in the code that do not run with my 32bit interpreter.

Cheers Thomas
Reply all
Reply to author
Forward
0 new messages