This sounds like a handy feature. Recent releases of adodbapi allow the programmer to specify the paramstyle she wishes to use. If she uses 'qmark' (the default) her query is used unchanged. If she uses 'named' or 'format', then her query is converted to 'qmark' before being used. The cursor stores an ADODB.Command structure as its .cmd attribute. The (converted) query text is stored in the .cmd.CommandText attribute. There is no storage of the original query, although it might be an optimization to keep it around to avoid re-parsing.
Q) Should a reference to cursor.query return the original query text, or the reformatted version? Q) What is "mogrify"? Is that a reformatted version? -- Vernon On Sun, Feb 13, 2011 at 6:04 AM, William Dode <w...@flibuste.net> wrote: > Hi, > > With psycopg2 I use "mogrify" or the "query" attribute to retrieve the > exact sql query. It's very usefull for debugging. > > Could it be possible to have the same with adodbapi ? I mean, is it > possible with ado to retrieve the sql query ? > > How do you do with other databases ? > > bye > > thanks to read my bad english... > > -- > William Dodé - http://flibuste.net > Informaticien Indépendant > > _______________________________________________ > DB-SIG maillist - DB-SIG@python.org > http://mail.python.org/mailman/listinfo/db-sig >
_______________________________________________ DB-SIG maillist - DB-SIG@python.org http://mail.python.org/mailman/listinfo/db-sig