Working with Access tables and python scripts

hey.ho.fredl at gmail.com hey.ho.fredl at gmail.com
Tue Apr 14 18:46:10 EDT 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