On Fri, May 25, 2012 at 12:04 PM, Tim Roberts <t...@probo.com> wrote:
> Alan Trick wrote: > > On Fri, May 25, 2012 at 10:18 AM, Tim Roberts <t...@probo.com> wrote: > >> 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',)". > > I'd expect that. > > I am at a loss. The adodbapi code gives the OLE DB provider a first shot > at processing the parameters. If that fails, then the Python code does > the processing itself. My guess is that the OLE DB provider here is > saying "it worked!", but isn't actually setting up the substitutions. > > -- > Tim Roberts, t...@probo.com > My guess is that Tim's guess is correct. ADO really doesn't do much to remove the differences between SQL engines, and the adodbapi code blindly hands stuff to it. If the FoxPro provider does not handle parameters, or expects some format other than qmark, you might see an error like this one. Try setting adodbapi.adodbapi.verbose = 4 and see if that sheds any light. Particularly look for the line that specifies 'error in COM Refresh(), so adodbapi is building a parameter list'. -- Vernon Cole
_______________________________________________ python-win32 mailing list python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32