mirror of
https://github.com/Microsoft/sql-server-samples.git
synced 2025-12-08 14:58:54 +00:00
@@ -5,8 +5,8 @@ username = 'myusername'
|
||||
password = 'mypassword'
|
||||
|
||||
#Connection String
|
||||
cnxn = pyodbc.connect('DRIVER={SQL Server Native Client 11.0};SERVER='+server+';DATABASE='+database+';UID='+username+';PWD='+ password)
|
||||
cursor = cnxn.cursor()
|
||||
connection = pyodbc.connect('DRIVER={SQL Server Native Client 11.0};SERVER='+server+';DATABASE='+database+';UID='+username+';PWD='+ password)
|
||||
cursor = connection.cursor()
|
||||
|
||||
#Sample select query
|
||||
cursor.execute("SELECT @@version;")
|
||||
|
||||
Reference in New Issue
Block a user