Hi,
So...answered my own question. And read the whole response 1st!
I edited the code (/usr/local/lib/python2.7/dist-packages/DatabaseLibrary/connection_manager.py) and added (after line 79):
elif dbapiModuleName in ["pymssql"]:
dbPort = str(dbPort or 1433)
logger.debug ('Connecting using : %s.connect(database=%s, user=%s, password=%s, host=%s, port=%s) ' % (dbapiModuleName, dbName, dbUsername, dbPassword, dbHost, dbPort))
self._dbconnection = db_api_2.connect (database=dbName, user=dbUsername, password=dbPassword, host=dbHost)
So that gave me a connection but things were still weird. I couldn't get Select statements to work. I could see them reach the MS SQL DB and get executed but the result was empty. So I searched some more and as it turns out I did it all wrong ;-)
I installed pymssql by doing
apt-get install python-pymssql
that is WRONG!!!! It doesn't work according to some sources. So you need to do the following (all as sudo):
(sudo apt-get uninstall python-pymssql <--if you already did what I did!)
sudo apt-get install python-dev libxml2-dev libxslt-dev
sudo pip install Cython
sudo pip install pymssql
Now everything seems to be working as advertised! I also took my code back out and it still works. Not sure though that that is 100% original code now because I changed my system so much. Maybe someone out there can confirm this some day.
So "works on my machine now" and I am happy. pymssql does treat the port variable a bit differently so it could be something to clean up some day.
Cheers & Thanks for those that helped!
Oliver