I want to connect to a MS Acces database that is on my host system. I am using Python 3.7 in jupyter notebook. When I connect to the engine, I get the exception InterfaceError.
My Code:
import urllib
from sqlalchemy import create_engine
connection_string = (
r'DRIVER={Microsoft Access Driver (*.mdb, *.accdb)};'
r'DBQ=./Datenbank1.accdb;'
)
connect_str = f"access+pyodbc:///?odbc_connect={urllib.parse.quote_plus(connection_string)}"
engine = create_engine(connect_str, echo=True)
engine.connect()
InterfaceError: (pyodbc.InterfaceError) ('IM002', '[IM002] [Microsoft][ODBC Driver Manager] Der Datenquellenname wurde nicht gefunden, und es wurde kein Standardtreiber angegeben (0) (SQLDriverConnect)') (Background on this error at: http://sqlalche.me/e/13/rvf5)
The data source name was not found and no default driver was specified (0) (SQLDriverConnect)')
Can you help me to find the error? Maybe I am missing the right driver but I don't know how to install it
pyodbc.drivers()to see what ODBC drivers are available to your Python app.