pyodbc.connect example
Example: connect with pyodbc with statement
with pyodbc.connect(conx_string) as conx:
cursor = conx.cursor()
cursor.execute(query)
data = cursor.fetchall()
with pyodbc.connect(conx_string) as conx:
cursor = conx.cursor()
cursor.execute(query)
data = cursor.fetchall()