connecting to Sybase/MsSQL from python

Alan Kennedy alanmk at hotmail.com
Sun Feb 13 13:15:56 EST 2005


[John Fabiani]
> I'm hoping someone on the list has connected to sybase/MsSQL with something
> that works with DBAPI 2.0 from a linux box (SUSE 9.2) because I can't seem
> to get it done.  I found Object Craft's python code that uses FreeTDS.  But
> I can't get it compiled.  The code is looking for "sybdb.h" (first error) -
> of course I don't have "sybdb.h".  It is not in Object Crafts code nor in
> the FreeTDS source.  I'm guessing that I need sybase develop lib's but I
> don't know where they are to be found.  

Hmmm, google("sybdb.h source", submit="I'm feeling Lucky")

lands on

http://www.freetds.org/reference/a00337.html

which has a GPL licence declaration on the top, so it seems that the 
FreeTDS have an OSS version available.

If your compile is failing because it cannot find the file, perhaps you 
neglected to run "./configure" before starting the compile?

http://www.freetds.org/userguide/config.htm

> So is there a kind sole out there that can help with instructions on what is
> needed to get python talking to MsSQL.

Sorry, can't help you there, haven't used FreeTDS.

But I hate to see questions being asked a *second* time without some 
form of reasonable answer .....

As already mentioned by another poster, have you considered using ODBC? 
There are several python ODBC implementations.

HTH,

-- 
alan kennedy
------------------------------------------------------
email alan:              http://xhaus.com/contact/alan



More information about the Python-list mailing list