Advertisement
Guest User

Code

a guest
Sep 25th, 2015
399
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.50 KB | None | 0 0
  1. import os
  2. import sys
  3. import time
  4. import pyodbc
  5.  
  6. LOCATION = "c:\Users\USERNAME\Desktop\DATA\ScorMonitor.db"
  7.  
  8.  
  9. cnxn = pyodbc.connect(r"DRIVER={Microsoft Paradox Driver (*.db)};UserCommitSync=Yes;PageTimeout=5;axScanRows=8;MaxBufferSize=2048;FIL={Microsoft Paradox Driver};DriverId=25;DefaultDir=C:\Users\USERNAME\Desktop\3s\DATA;DBQ=C:\db1.db".format(LOCATION), autocommit=True, readonly=True)
  10. cursor = cnxn.cursor("")
  11. cursor.execute("select last, first from test")
  12. row = cursor.fetchone()
  13. print row
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement