Python Forum

Full Version: Unable to connect to MS Access
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi All,

I am trying to connect MS Access DB, but failed with below errors.
Tried with pyodbc & pypyodbc packages even failed.

OS: Windows 10 on 64-bit
MS Access on 64-bit
IDLE installed on 64-bit

>>> import pypyodbc
>>> cnxn = pypyodbc.win_connect_mdb('C:\\Users\\SasanuruKumar\\Documents\\Database2.mdb')
Error:
Traceback (most recent call last): File "<pyshell#65>", line 1, in <module> cnxn = pypyodbc.win_connect_mdb('C:\\Users\\SasanuruKumar\\Documents\\Database2.mdb') File "C:\Users\SasanuruKumar\AppData\Local\Programs\Python\Python36\lib\site-packages\pypyodbc.py", line 2755, in win_connect_mdb driver_name = get_mdb_driver() File "C:\Users\SasanuruKumar\AppData\Local\Programs\Python\Python36\lib\site-packages\pypyodbc.py", line 2748, in get_mdb_driver raise Exception('Access Driver is not found.') Exception: Access Driver is not found.
Please help out from this issue.

MANY MORE THANKS IN ADVANCE FOR FIXING ISSUE.

BR,
Kumar
You need a lot more setup before you can access your Access Database.
See the sample code here: https://github.com/jiangwen365/pypyodbc