Pyodbc on Webfaction

I need to communicate with a database on Microsoft SQL Server from a Webfaction server. These instructions almost worked. But I got this error:

Can't open lib '/home/myaccount/lib/libtdsodbc.so' : file not found (0) (SQLDriverConnect)")

A quick check of my lib dir confirmed the file did not exist.

The solution was to re-run the install of FreeTDS using the Webfaction instructions, but replace:

./configure --prefix=$HOME

with:

./configure --with-tdsver=8.0 --prefix=$HOME

The file libtdsodbc.so was created and pyodbc now worked.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s