Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
MS access db
#1
Hi,
This question has been asked a 1000 times over the years in various forums.
I had hoped that with python 3.10 things would be smoother. I still can't make it work.
Problem:
I have been given a database with 20 tables with many records in them.
(Genealogical data 16th -18th century.)
In the 16th century a local administrator decided to put all these data in MS access with extension '.accdb'
I imported pyodbc: ok
Then check if drivers are available: ok
print([x for x in pyodbc.drivers() if x.startswith('Microsoft Access Driver')])
Output:
['Microsoft Access Driver (*.mdb, *.accdb)']
Then I try to read the database with the code provided in the pyodbc site, and get the message:
Error:
Traceback (most recent call last): File "D:\FV\20220324 FV\PyOdbc.py", line 28, in <module> conn = pyodbc.connect(r'Driver={Microsoft Access Driver (*.mdb, *.accdb)}') pyodbc.Error: ('HY000', 'The driver did not supply an error!')
I have devised a workaround to get to the data, but it would be faster if I could read them directly.
Any ideas?
thx,
Paul
It is more important to do the right thing, than to do the thing right.(P.Drucker)
Better is the enemy of good. (Montesquieu) = French version for 'kiss'.
Reply


Messages In This Thread
MS access db - by DPaul - Mar-25-2022, 07:42 AM
RE: MS access db - by Larz60+ - Mar-25-2022, 12:03 PM
RE: MS access db - by DPaul - Mar-25-2022, 02:30 PM
RE: MS access db - by buran - Mar-25-2022, 03:55 PM
RE: MS access db - by DPaul - Mar-25-2022, 04:46 PM
RE: MS access db - by buran - Mar-25-2022, 05:08 PM
RE: MS access db - by DPaul - Mar-25-2022, 06:23 PM

Forum Jump:

User Panel Messages

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