[python-sybase] problems with executing dynamically created queries.

Skip Montanaro skip at pobox.com
Thu, 22 Jul 2004 23:56:08 -0500


    >> and... why is there several styles in DB API 2.0? i mean the
    >> Sybase.paramstyle thing. i thought DB API was there for portability,
    >> and then i find out that different modules have different ways to
    >> create sql queries. so there is absolute zero portability. why?

    Dave> You will have to ask the database vendors that one.

Assuming all the possible substitution styles are equivalent (I've seen "%s"
and "?" as placeholders as well as the dict style the python-sybase module
supports), I think the DB API could have specified one style then required
implementers to map from it to the native library's style.  That might have
been a PITA for some, but should be possible you'd think.  DB API 3.0
anyone?

Skip