Skip to content

Instantly share code, notes, and snippets.

@brettclare
Created April 29, 2016 23:41
Show Gist options
  • Save brettclare/3eb4bcdfb1ade164b080ee0a2a9dd6de to your computer and use it in GitHub Desktop.
Save brettclare/3eb4bcdfb1ade164b080ee0a2a9dd6de to your computer and use it in GitHub Desktop.
Enter file contents here # -*- coding: utf-8 -*-
import pypyodbc,csv
pypyodbc.lowercase = False
conn = pypyodbc.connect(
r"Driver={Microsoft Access Driver (*.mdb, *.accdb)};" +
r"Dbq=H:\GamePlanMaster\GamePlanMaster 2.accdb;")
cur = conn.cursor()
for table_name in cur.tables(tableType='TABLE'):
print(table_name)
cur.execute("SELECT * FROM WMS_worksheet_OPS_Plan_linked")
rows = cur.fetchall()
for row in rows:
print (row)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment