简体   繁体   中英

read access file (mdb) with pyodbc error in ubuntu

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.

First, check the name of the driver .

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM