Python CGI and Accessing MS QL Server Database

Navtej Riyait Navtej.Riyait at ukgateway.net
Mon Jan 24 18:51:08 EST 2000


Hello,

I am trying to create a little test web application in python/HTML using
IIS. I have setup IIS so that .cgi scripts are sent to the python
interpreter. I am trying to access a SQL Server database, 'pubs' (using
Python DB APIs). I am importing odbc, dbi in my script. Database access
works fine when I run a dbtest script at the command line, but the same bit
of code gives an error when run in the .cgi script. It is not finding the
data source name (DSN). I have set up the DSN in the ODBC Driver Manager
correctly.

I can't see what environment parameters to set to get the .cgi python script
to access the 'pubs' database. Can anyone help ?


Thanks






More information about the Python-list mailing list