I must connect to an old Microsoft Access DB (.mdb) using python pyodbc.
Here's what i've installed on my computer:
- Microsoft Access 2019, 64-bit
- Microsoft Visual Studio Code
- I've done the pip install pyodbc
I've tried several connection strings
, but none of them work. I always get an error message
('IM002', '[IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified (0) (SQLDriverConnect)')
Here's some code i've tried:
_ConnStr = 'Provider=Microsoft.ACE.OLEDB.12.0;Data Source=D:\\TEMP\\MYFILE.MDB;Persist Security Info=False;'
_conn = pyodbc.connect(_ConnStr)
I've seen previous post about people using 32 bits of python vs access 64 bits, but it's not my case. I'm using 64 bits for python and for access.