diff --git a/samples/tutorials/python/jupyter/sample_python_jupyter.py b/samples/tutorials/python/jupyter/sample_python_jupyter.py index f285dccc..0fc149fb 100644 --- a/samples/tutorials/python/jupyter/sample_python_jupyter.py +++ b/samples/tutorials/python/jupyter/sample_python_jupyter.py @@ -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;")