Python Forum
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
Reply
#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
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Using pyodbc&pandas to load a Table data to df tester_V 3 748 Sep-09-2023, 08:55 PM
Last Post: tester_V
  pyodbc gmerritt 8 2,799 Feb-21-2022, 07:21 PM
Last Post: gmerritt
  Formatting Data/Time with Pyodbc and openpyxl bearcats6001 0 2,251 Aug-17-2020, 03:44 PM
Last Post: bearcats6001
  Get database used data space from pyodbc susja 1 2,202 Aug-14-2020, 02:01 PM
Last Post: susja
  pyodbc error ('82', '[82] 523 80 (0) (SQLDriverConnect)') paulsuk1982 1 2,134 Nov-29-2019, 11:05 AM
Last Post: Larz60+
  pyodbc.Error SQLBindParameter pcarra 0 3,847 Jul-08-2019, 08:22 PM
Last Post: pcarra
  Using VBA to Call a Python script causes error in pyodbc connector pcarra 1 2,775 Jun-11-2019, 04:14 PM
Last Post: pcarra
  Split List and Sublist from Pyodbc parthi1705 1 2,203 May-05-2019, 10:44 AM
Last Post: Larz60+
  Problem with pyodbc executemany() RBeck22 1 7,323 Apr-02-2019, 06:12 PM
Last Post: micseydel
  PyODBC error - second parameter to executemany must be a sequence, iterator, or gener RBeck22 1 7,020 Mar-29-2019, 06:44 PM
Last Post: RBeck22

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020