python connection to mssql from windows box

Josh Close narshe at gmail.com
Thu Sep 30 10:01:37 EDT 2004


On Thu, 30 Sep 2004 09:09:05 +0100, Tim Golden
<tim.golden at viacom-outdoor.co.uk> wrote:
> I think you're asking for this:
> 
> http://www.object-craft.com.au/projects/mssql/
> 
> (which, by the way, is the first non-mailing-list result
> Google gives for python mssql)
> 
> TJG

Google? What's that?

I use the Sybase module by object-craft for linux/python connections
to mssql, and I refuse to use the mssql module due to these things
listed on the main mssql page.

There are a few things that do not work - the work still has not been done.

    * Almost no testing has been performed - if you use the module you
will be a pioneer.
    * You cannot send parameters to Cursor.execute() - for the moment
you must format an SQL expression with the parameters inline.
    * On Windows the Cursor.callproc() method does not work. Some guru
will have to figure out what is going wrong (i.e. not me). You can
achieve the same result by simply using Cursor.execute(). For example:

c = db.cursor()
c.execute('sp_help titles')

    * The state machine for the Cursor class is quite hokey. It
returns COMPUTE rows in their own result set. At some stage this will
be cleaned up.
    * The Connection.commit() and Connection.rollback() methods have
not been implemented.


So basically it *kind of* works, but not well. I'm talking about
native windows module that uses the client tools api. Maybe ADO will
be the best thing for me. I've seen some problems with that too
though...... man I hate mssql.

-Josh



More information about the Python-list mailing list