conn=pyodbc.connect('DRIVER={ODBC Driver 17 for SQL Server};'
'Server=servername, 1433;'
'Database=database;'
'Trusted_Connection=yes;')
This is the sql connection I have. This code works as expected on Windows 11. But when running on WSL2 on the same PC it gives error message
('HYT00', '[HYT00] [Microsoft][ODBC Driver 17 for SQL Server]Login timeout expired (0) (SQLDriverConnect)')
Connecting to the database requires VPN connection using AnyConnect. I followed instructions in this post to update the resolv.conf file. But the problem still persists. I'm not sure if there is still something wrong with VPN or it's something else.
Very much appreciated the help!