MS SQL Server module for Python

Troubleshooting

If you have any trouble shooting suggestions, please send me some email at djc@object-craft.com.au.

If you wish to see what the module is doing at the API level you can set a debug file to capture all API calls. For example the following program will log all API activity to c:\temp\debug.txt.

import mssqldb
mssqldb.set_debug(open('c:/temp/debug.txt', 'w'))
import MSSQL
db = MSSQL.connect('rat', 'sa', '', 'pubs')
c = db.cursor()
c.execute('select * from titles')
c.fetchall()
c.nextset()

You could also do something like this:

import sys, MSSQL
MSSQL.set_debug(sys.stderr)
db = MSSQL.connect('rat', 'sa', '', 'pubs')
c = db.cursor()
c.execute('select * from titles')
c.fetchall()
c.nextset()

When something which should work is not working I will probably ask you to send me a log file which was produced this way.