freetds

SqlAlchemy equivalent of pyodbc connect string using FreeTDS

SqlAlchemy equivalent of pyodbc connect string using FreeTDS Question: The following works: import pyodbc pyodbc.connect(‘DRIVER={FreeTDS};Server=my.db.server;Database=mydb;UID=myuser;PWD=mypwd;TDS_Version=8.0;Port=1433;’) The following fails: import sqlalchemy sqlalchemy.create_engine(“mssql://myuser:[email protected]:1433/mydb?driver=FreeTDS& odbc_options=’TDS_Version=8.0′”).connect() The error message for above is: DBAPIError: (Error) (‘08001’, ‘[08001] [unixODBC][FreeTDS][SQL Server]Unable to connect to data source (0) (SQLDriverConnectW)’) None None Can someone please point me in the right direction? Is there a …

Total answers: 5