[DB-SIG] MS SQL Server module in development

Dave Cole djc@object-craft.com.au
02 Jul 2001 16:33:01 +1000


For the last couple of weeks I have been developing a Python module to
interface to MS SQL Server.

MS SQL Server uses a DB library which looks a lot like the old Sybase
DB library.  The module work when compiled against either library -
meaning you can run the module in any of the following combinations:

        Client          Server
        ======          ======
        Unix            Sybase
        Unix            MS SQL Server
        Windows         Sybase
        Windows         MS SQL Server

The development is probably a few days away from the point where I
will make the first public announcement, but I have hit a bit of a
conceptual block.

The DB library only allows a single result set to be in flight over a
server connection.  To make it possible to open multiple cursors
simultaneously I have done the "obvious" thing of opening a new
connection for each cursor.

This introduces the problem: how can I implement Connection.commit()
and Connection.rollback()?

I really have two options:

1) Do not allow multiple simultaneous cursors on a connection.

2) Implement Cursor.commit() and Cursor.rollback()

Can anyone else think of any other options?



For the morbidly curious, here is the web page:

        http://www.object-craft.com.au/projects/mssql/

Here are the current items on my TODO list:

* implement Connection.commit(), Connection.close()

* improve message/error collection mechanism

* change Cursor.callproc() parameter passing to sequence (from dict)

* implement some sort of parameter passing to Cursor.execute()

* implement BLOB support

- Dave

-- 
http://www.object-craft.com.au