MS SQL Server module for Python
Introduction
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 MS SQL Server package is still in early
development so some things will not work - other things will GP
fault.
The aim is to support all of the Python Database API, version 2.0.
Module Status
If you use the module please send me some
email so I can either fix the problem or document the things
that work.
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.
Supported Platforms
Please help me out here - if you try a new
client/server combination, tell me!
The module compiles and works on the following platforms:
Client | Server | Comment | ||
---|---|---|---|---|
OS | Libraries | OS | Libraries | |
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() |