[python-win32] adodbapi: using prepared statements

Tim Roberts timr at probo.com
Fri May 25 19:18:54 CEST 2012


Alan Trick wrote:
> I'm trying to use prepared statements with the adodbapi module, but
> it's not working. I'm using the Visual FoxPro OLE DB drivers, and I'm
> worried that this is just something that they can't handle.

Well, there error is firing inside the adodbapi code, not in VFP,
although it's possible that the OLE DB driver's parameter handling is
interfering.  The implication is that the OLE DB's provider has scanned
the statement and decided the are no parameters to substitute.

If you print conn.paramstyle, is it still qmark?

Is there any change if you use a tuple instead of a list?  That is:

    cur.execute("select * from chiro1 where prefix = ?", ('LEG',))

-- 
Tim Roberts, timr at probo.com
Providenza & Boekelheide, Inc.



More information about the python-win32 mailing list