0

I would like to read an access file (mdb) with pyodbc. The code is supposed to be very simple:

import pyodbc 
DBfile = './test.mdb'
conn = pyodbc.connect('DRIVER={Microsoft Access Driver (*.mdb)};DBQ='+DBfile)

where the python script and the mdb file are in the same folder. However, I get the following error:

Error: ('01000', "[01000] [unixODBC][Driver Manager]Can't open lib 'Microsoft Access Driver (*.mdb)' : file not found (0) (SQLDriverConnect)")

where am I wrong?

thanks a lot for any kind of help.

diedro
  • 511
  • 1
  • 3
  • 15

1 Answers1

0

First, check the name of the driver.

Next, check that you have the correct 32- or 64-bit driver installed.

Gustav
  • 53,498
  • 7
  • 29
  • 55