Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

db connection string timeout

result = None
with pyodbc.connect('DRIVER={SQL Server};SERVER=mydb;DATABASE=solarwinds;Trusted_Connection=True', timeout=1) as cnxn:
    cursor = cnxn.cursor()
    result = cursor.execute(query).fetchall()
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #db #connection #string #timeout
ADD COMMENT
Topic
Name
8+8 =