On 2/4/11 9:08 PM, Dennis Lee Bieber wrote: > On Fri, 4 Feb 2011 15:45:21 -0500, Ed Leafe > <e...@leafe.com> declaimed the following in > gmane.comp.python.dabo.user: > >> >> I thought that there was a problem with the choice of '?' as the >> "standard" placeholder to be replaced, since a query might contain question >> marks. >> > I'm having trouble visualizing a DBMS in which a ? is part of a > schema identifier and not data that could be inserted via, well, a > parameter filling in a ? > > Of course -- the naming system used by M$ JET (Access) probably has > a use for ? in identifiers.
What would be a good general-use way to be able to "safely" mark parameters in an SQL string, given that any potential character or group of characters to use could potentially be part of a literal SQL string? I guess we'd have to check for the context. For instance: 1) sql = "select * from c where pkid=?" 2) sql = "select * from c where '?' in name and cat_id=?" Case 1 is straightforward; Case 2 would only interpret the second ? as a parameter placeholder because of being inside quotes. Sounds hairy to code for all the edge cases, but there would be tremendous value in having a dabo-specified parameter placeholder that gets converted by dabo to the backend convention at the correct time. Paul _______________________________________________ Post Messages to: Dabo-users@leafe.com Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users Searchable Archives: http://leafe.com/archives/search/dabo-users This message: http://leafe.com/archives/byMID/4d4d7cf9.2030...@ulmcnett.com