Anyone has successfully connect to mssql thru pyodbc within sqlalchemy? I am using turbogears2 right now, and try to connect to mssql, working on a mac os platform.
Getting following error:
sqlalchemy.exc.DBAPIError: (Error) ('00000', '[00000] [iODBC][Driver Manager]dlopen({SQL Server}, 6): image not found (0) (SQLDriverConnectW)') None None
There is a better approach than the old macports or fink, brew:
brew install freetds unixodbc
And it doesn't even need root to install it.
Simply do the installation by:
sudo port install freetds +mssql +odbc +universal
This will install both freetds and unixODBC, we can either using unixODBC for ODBC management, or using iODBC shipped with Mac OS.
./configure --prefix=/usr/local/lib/freetds --with-tdsver=8.0 --enable-msdblib --enable-dbmfix --with-gnu-ld --enable-shared --enable-static
make
make install
For connecting to SQL Server 2005/8, make sure setting the tds version to 8.0, use following terminal command:
export TDSVER = 8.0
Make sure right language has been setted:
export LC_ALL=en_US.UTF-8
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With