when trying to connecnt to my local sql server i keep on getting the following error:
pyodbc.OperationalError: ('HYT00', '[HYT00] [Microsoft][ODBC Driver 17 for SQL Server]Login timeout expired (0) (SQLDriverConnect)')
this is my code:
import pyodbc
conn = pyodbc.connect('DRIVER={ODBC Driver 17 for SQL Server};SERVER=127.0.0.1;port=32782;DATABASE=db;UID=db;PWD=db;Trusted_Connection=yes')
cursor = conn.cursor()
cursor.execute('SELECT * FROM db.tt_content LIMIT 3')
for row in cursor:
print(row)
Note: this sql server inside a ddev container
Note2: i tried SERVER=127.0.0.1,32782
and got the same result