ODBC Problem on IIS4

Jack Knight jfk at pobox.com
Thu Dec 9 12:53:03 EST 1999


Hi,

Sorry if this is a FAQ, but I can't find anything on it anywhere!

I am getting the following error when trying to do a simple SQL lookup:


     File "C:\InetPub\cgi-bin\loginMethod.py", line 54, in getCName

         cursor.execute(query,params)
     dbi.internal-error: [Microsoft][ODBC Microsoft Access 97
     Driver] Invalid argument. in EXEC

Setup is:
Windows NT4 SP5, IIS4, ODBC V3.5. Python 1.5.

Offending Code fragment:

def login(id,password):
 realPwd=decrypt(password)
 # Perform the query to the database
 connection=odbc.odbc(cfg.DSN)
 cursor=connection.cursor()
 params=[id,realPwd]
 query="select CustomerID, Password, Status from CustomerDetails where
CustomerID=:1 and Password=:2"
 cursor.execute(query,params)
 row=cursor.fetchone()

The DSN is all OK, since Perl works fine. Do I perhaps have a wrong dbi
or odbc module for Python?

TiA,

Jack Knight


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/19991209/3239e3bb/attachment.html>


More information about the Python-list mailing list