[python-win32] adodbapi: using prepared statements

Alan Trick atrick at tri-tech.com
Fri May 25 19:42:07 CEST 2012


On Fri, May 25, 2012 at 10:18 AM, Tim Roberts <timr at probo.com> wrote:
>
> If you print conn.paramstyle, is it still qmark?

Yes, the default is qmark.

> Is there any change if you use a tuple instead of a list?  That is:
>
>    cur.execute("select * from chiro1 where prefix = ?", ('LEG',))

I get an identital exception with a tuple. For what it's worth, the
value of cur.query is different, but I don't know if that has any
effect on anything. With a list, cur.query is set to "select * from
chiro1 where prefix = ?,parameters=['LEG']", with a tuple it's "select
* from chiro1 where prefix = ?,parameters=('LEG',)".

P.S. Sorry time about the duplicate email Tim. I forgot that my email
client was retarded and that I was on a mailing list ;-)


More information about the python-win32 mailing list