Working with Access tables and python scripts

hey.ho.fredl at hey.ho.fredl at
Wed Apr 15 00:46:10 CEST 2015

I don't know how to start a Python script from Access, but you could definitely do it the other way around, reading the Access database from Python.

An example:
import pyodbc
ODBC_DRIVER = '{Microsoft Access Driver (*.mdb)}'

connstr = 'DRIVER={0};DBQ={1}'.format(ODBC_DRIVER, 'filename.mdb')
conn = pyodbc.connect(connstr)

cur = conn.cursor()
cur.execute('SELECT * FROM table')


More information about the Python-list mailing list