MS SQL Server Extension?

J

Jack

Hi all, in my next project, my Python code needs to talk to an MS SQL
2000 Server. Internet search gives me http://pymssql.sourceforge.net/
I wonder what module(s) people are using. My code runs on a Linux
box so the module has to build on Linux. Any hints/pointers are welcome.
 
T

Tim Golden

Jack said:
Hi all, in my next project, my Python code needs to talk to an MS SQL
2000 Server. Internet search gives me http://pymssql.sourceforge.net/
I wonder what module(s) people are using. My code runs on a Linux
box so the module has to build on Linux. Any hints/pointers are welcome.

There are several modules around which will cover this.
One of these days I'll take the post I'm about to write
and stick it on a Wiki or something because I seem to
write it about once every six months :)

In no particular order:

adodbapi - recently resurrected from moribundity (if
that's a word); search the list archives because I
can't remember who's working on it.

+ Win32 only (afaik)
+ Covers all sorts of things as well as MSSQL
+ Allows for passthrough authentication

- Used to have some slight flakiness in it. Bloke
who's taken over maintenance says he's patched and
simplified things. Haven't tried it since.

pymssql - http://pymssql.sf.net

+ Win32 & Linux (via FreeTDS)

- Doesn't allow passthrough authentication
- Has some issues with Unicode

pyodbc - http://pyodbc.sf.net
(a recent runner)

+ Win32 & Linux (via whatever *nix ODBC package)
+ Apparently more actively maintained than pymssql
+ (Is currently the favoured front-runner among the
sqlalchemy devs)

- Lacks .nextset (in case that's important to you)

Other contenders:

mxODBC - Commercial License but a very strong
and long-standing candidate. Lacks .nextset
support. Works on *nix via iODBC etc.

Object Craft MSSQL - Worked well for me for years
but they seemed to have abandoned it of late.
Still there. Still works. But no binaries beyond
Python 2.3. (I did try to recompile using MingW
but couldn't get it to work). Works on *nix via
FreeTDS.

TJG
 
J

Jack

Thanks Tim for the reply. Good info.

I just set up pymssql. Setting it up was fairly straightforward. What kind
of problems
does it have with unicode?
 
F

Frank Millman

There are several modules around which will cover this.
One of these days I'll take the post I'm about to write
and stick it on a Wiki or something because I seem to
write it about once every six months :)

In no particular order:

adodbapi - recently resurrected from moribundity (if
that's a word); search the list archives because I
can't remember who's working on it.

+ Win32 only (afaik)
+ Covers all sorts of things as well as MSSQL
+ Allows for passthrough authentication

- Used to have some slight flakiness in it. Bloke
who's taken over maintenance says he's patched and
simplified things. Haven't tried it since.

pymssql -http://pymssql.sf.net

+ Win32 & Linux (via FreeTDS)

- Doesn't allow passthrough authentication
- Has some issues with Unicode

pyodbc -http://pyodbc.sf.net
(a recent runner)

+ Win32 & Linux (via whatever *nix ODBC package)
+ Apparently more actively maintained than pymssql
+ (Is currently the favoured front-runner among the
sqlalchemy devs)

- Lacks .nextset (in case that's important to you)

Other contenders:

mxODBC - Commercial License but a very strong
and long-standing candidate. Lacks .nextset
support. Works on *nix via iODBC etc.

Object Craft MSSQL - Worked well for me for years
but they seemed to have abandoned it of late.
Still there. Still works. But no binaries beyond
Python 2.3. (I did try to recompile using MingW
but couldn't get it to work). Works on *nix via
FreeTDS.

TJG

An addition to the above list is the odbc module from the win32all
package. I use this, and although it is not 100% DB-API 2.0 compliant,
I find it quite satisfactory.

Google Groups seems to be running about 12 hours behind, so my
apologies if this has already been mentioned.

Frank Millman
 

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

Forum statistics

Threads
473,996
Messages
2,570,238
Members
46,826
Latest member
robinsontor

Latest Threads

Top