Connection Strings
July 10, 2008
odbc and mssql are the least documented/supported databases in nearly all open source projects. I understand, evil empire, i get it. So when I dig up gems after tons of googling I should write them down so …
Connection String for pyodbc, using a system DSN
"DSN=dsn_name;UID=username;PWD=passwd"
Connection String for sqlalchemy, using a system DSN
'mssql://username:passwd@/?dsn=dsn_name'
Leave the @ symbol after the passwd and don’t use an @ symbol in your passwd (guilty). I assume the symbol is used in the parsing of the string, why I am not so sure on.
Maybe this does the trick you need?
mssql:///?user=&password=&dsn=