Merge pull request #469 from ashwanitr001/patch-2

Updated the code
This commit is contained in:
Jovan Popovic (MSFT)
2018-11-05 13:24:31 +01:00
committed by GitHub
@@ -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;")