Closed omaralt closed 4 years ago
Your servername
string already specifies port 1433. If that is correct then you don't need to use sqlserverport
because you already know the port number.
If you really do need to look up the port number by instance name (which I sort of doubt, for amazonaws) then remove the port number from the servername
string.
Ok thanks, are there any troubleshooting guides for pyodbc and linux? :)
There's this ...
https://github.com/mkleehammer/pyodbc/wiki/Connecting-to-SQL-Server-from-Linux
... but I suspect that you may have seen it already.
Hi I'm developing in Linux for work for the first time and have been struggling to connect to SQL Server on an AWS instance via pyodbc. I have installed the Drivers via the MS webpage and have moved sqlserverport.py to my packages dir but am getting a socket error. Mine is on 1433 though slightly different to 1433. I am also not sure if the connect string is properly formatted either.
Any feedback would be appreciated, thanks :)
Ubuntu in AWS Cloud9 env running Python3.6
Code:
Below is the error message