Pyodbc error - Printable Version +- Python Forum (https://python-forum.io) +-- Forum: Python Coding (https://python-forum.io/forum-7.html) +--- Forum: General Coding Help (https://python-forum.io/forum-8.html) +--- Thread: Pyodbc error (/thread-19191.html) |
Pyodbc error - taxit - Jun-17-2019 Hello!! I'm try to connect to a accdb Access database: import pyodbc conn = pyodbc.connect(r'Driver={Microsoft Access Driver (*.mdb, *.accdb)};DBQ=C:\Users\GCAMPS.TAX5600\Desktop\local.accdb;') accesscursor = conn.cursor() accessQuery = "SELECT * FROM peculiaritats" accesscursor.execute(accessQuery) r= accesscursor.fetchone() print (r)And I get this error: Microsoft Access for Office 365 MSO (16.0.11629..20210) 32 bitsMS Access DB Engine 2016 32 bits Python 3.7.3 32 bits Pyodbc installed Driver ODBC: Microsoft Access Driver (*.mdb, *.accdb) Total permissions on HKEY_LOCAL_MACHINE\SOFTWARE\ODBC Anyone can help me? Thx RE: Pyodbc error - Larz60+ - Jun-18-2019 The database you are trying to open requires a newer version of Microsoft Access I'm not a huge user of MS windows, But you can probably update the access driver Documentation is here: https://github.com/mkleehammer/pyodbc/wiki/Connecting-to-Microsoft-Access as stated, only works with .mdb, not with .accdb There are other packages available, see: https://pypi.org/search/?q=MS+access |