connecting to Sybase/MsSQL from python

J

John Fabiani

Hi,
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.

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

jOHN
 
V

vincent wehren

John Fabiani said:
Hi,
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.

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

jOHN

Use mxODBC?
 
A

Alan Kennedy

[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,
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,048
Latest member
verona

Latest Threads

Top