ODBC/MS Access Doesn't Find Tables

Karsten Schneider k at felinity.com
Sun Nov 5 05:12:11 CET 2000

I'm trying to access a Microsoft Access database using either the mxODBC
or Win32 ODBC module--without much luck. I can connect to the database,
but the execute method fails. Here's what happens:

>>> import ODBC.Windows
>>> db=ODBC.Windows.connect('TestDB')
>>> csr=db.cursor()
>>> csr.execute('select * from codes')
Traceback (innermost last):
  File "<interactive input>", line 1, in ?
ProgrammingError: ('S0002', -1305, "[Microsoft][ODBC Microsoft Access
Driver] The Microsoft Jet database engine cannot find the input table or
query 'codes'.  Make sure it exists and that its name is spelled
correctly.", 3205)

The table exists, and the name is spelled correctly. Also, the same
thing happens using the ODBC module from the Win32 Extension module.

To test the Python installation I tried a different database
(Interbase), which works. Also, I tried accessing the Access database
using another application (Borland's DB Explorer), which works too.
Which seems to indicate that the Python ODBC module and Access don't get

Has anybody seen this problem before? Any ideas on what I'm doing wrong.


More information about the Python-list mailing list