Skip to content
Newer
Older
100644 18 lines (10 sloc) 333 Bytes
c278e74 @mkleehammer Single source base for Python 2 and 3
authored Nov 2, 2011
1
2 from testutils import *
3 add_to_path()
4
5 import pyodbc
6
7 cnxn = pyodbc.connect("DRIVER={SQL Server Native Client 10.0};SERVER=localhost;DATABASE=test;Trusted_Connection=yes")
8 print('cnxn:', cnxn)
9
10 cursor = cnxn.cursor()
11 print('cursor:', cursor)
12
13 cursor.execute("select 1")
14 row = cursor.fetchone()
15 print('row:', row)
16
17
Something went wrong with that request. Please try again.