MS SQL Server module for Python
This page describes the MS SQL Server module developed by Dave Cole. It provides a Python interface to the MS SQL Server relational database system.
The aim is to support all of the Python Database API, version 2.0.
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
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.
The module compiles and works on the following platforms:
|Linux||Sybase ASE 11.9.2||Linux||Sybase ASE 11.9.2||Everything I have tested works|
|Linux||Sybase ASE 11.9.2||Windows||MS SQL Server 7.0||Everything I have tested works|
|Windows||MS SQL Server 7.0||Linux||Sybase ASE 11.9.2||Cursor.callproc() fails - use Cursor.execute()|
|Windows||MS SQL Server 7.0||Windows||MS SQL Server 7.0||Cursor.callproc() fails - use Cursor.execute()|