A
A
Alexander Shilov2019-04-03 14:41:41
Python
Alexander Shilov, 2019-04-03 14:41:41

How to link Access and Python?

Good day, tell me, please, I found on the Microsoft website a way to connect a python program to DB Access

import pyodbc as sqlMS

connStr = (
    r"DRIVER={Microsoft Access Driver (*.mdb, *.accdb)};"
    r"DBQ=Q:\Шилов\Data Base\Documents.accdb;"
    )

conn = sqlMS.connect(connStr)

Error pops up while executing
Mistake
5ca49b9f1c0b0926587477.png

Found on the Internet that you need to install the driver, checked the Data Sources (ODBC)
Data Sources (ODBC)
5ca49bdcdefad430830975.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry Shitskov, 2019-04-03
@Zarom

Most likely you have 64 bit python and 32 bit access. Either install python x86 or access 64.
The best option is not to try to work with Access

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question