Skip to content

Instantly share code, notes, and snippets.

@sannae
Created October 6, 2022 09:15
Show Gist options
  • Save sannae/b57b8cca07afd61fca969b9e56f17b3c to your computer and use it in GitHub Desktop.
Save sannae/b57b8cca07afd61fca969b9e56f17b3c to your computer and use it in GitHub Desktop.
Python script to quickly read from MS Access
import pyodbc
conn = pyodbc.connect(r'Driver={Microsoft Access Driver (*.mdb, *.accdb)};DBQ=C:\Users\Ron\Desktop\Test\test_database.accdb;')
cursor = conn.cursor()
cursor.execute('select * from DESTINATARI')
for row in cursor.fetchall():
print (row)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment