Bottom Page

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 Pyodbc error
#1
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:

Error:
Traceback (most recent call last): File "C:\Users\GCAMPS.TAX5600\Desktop\prova.py", line 3, in <module> conn = pyodbc.connect(r'Driver={Microsoft Access Driver (*.mdb, *.accdb)};DBQ=C:\Users\GCAMPS.TAX5600\Desktop\local.accdb;') pyodbc.Error: ('HY000', "[HY000] [Microsoft][ODBC Microsoft Access Driver]General error Unable to open registry key Temporary (volatile) Ace DSN for process 0x2a10 Thread 0x2808 DBC 0x3beda44 Jet'. (63) (SQLDriverConnect); [HY000] [Microsoft][ODBC Microsoft Access Driver]General error Unable to open registry key Temporary (volatile) Ace DSN for process 0x2a10 Thread 0x2808 DBC 0x3beda44 Jet'. (63); [HY000] [Microsoft][ODBC Microsoft Access Driver] The database you are trying to open requires a newer version of Microsoft Access. (-1073); [HY000] [Microsoft][ODBC Microsoft Access Driver]General error Unable to open registry key Temporary (volatile) Ace DSN for process 0x2a10 Thread 0x2808 DBC 0x3beda44 Jet'. (63); [HY000] [Microsoft][ODBC Microsoft Access Driver]General error Unable to open registry key Temporary (volatile) Ace DSN for process 0x2a10 Thread 0x2808 DBC 0x3beda44 Jet'. (63); [HY000] [Microsoft][ODBC Microsoft Access Driver] The database you are trying to open requires a newer version of Microsoft Access. (-1073)")
Microsoft Access for Office 365 MSO (16.0.11629..20210) 32 bits

MS 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
Quote
#2
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/wi...oft-Access
as stated, only works with .mdb, not with .accdb

There are other packages available, see: https://pypi.org/search/?q=MS+access
Quote

Top Page

Possibly Related Threads...
Thread Author Replies Views Last Post
  pyodbc.Error SQLBindParameter pcarra 0 241 Jul-08-2019, 08:22 PM
Last Post: pcarra
  Using VBA to Call a Python script causes error in pyodbc connector pcarra 1 392 Jun-11-2019, 04:14 PM
Last Post: pcarra
  Split List and Sublist from Pyodbc parthi1705 1 312 May-05-2019, 10:44 AM
Last Post: Larz60+
  Problem with pyodbc executemany() RBeck22 1 1,015 Apr-02-2019, 06:12 PM
Last Post: micseydel
  PyODBC error - second parameter to executemany must be a sequence, iterator, or gener RBeck22 1 925 Mar-29-2019, 06:44 PM
Last Post: RBeck22
  Pyodbc does not accept variable from tkinter diegoctn 9 587 Feb-12-2019, 05:12 PM
Last Post: Larz60+

Forum Jump:


Users browsing this thread: 1 Guest(s)