import pyodbc
my_db_path = r'C:\testing\mydb.accdb'
my_db_pw = r'djw85nawj12'
conn = pyodbc.connect(r'DRIVER={Microsoft Access Driver (*.mdb, *.accdb)};DBQ=%s;PWD=%s' % (my_db_path, my_db_pw))
#in python 3.7.2 (pyodbc 4.0.32) -> works, returns conn object
#in python 3.11.3 (pyodbc 4.0.39) -> error: data source name not found and no default driver specified
I need to get this working in 3.11.3 and I don't understand why it fails. I tried multiple variations with and without usage of raw strings. What's happening in 3.11.3?