On Wed, Feb 22, 2006 at 09:11:17AM -0800, Cliff Wells wrote:
> self.loid, = hub.hub.getConnection( ).queryOne( "SELECT lo_import('%s') AS
> loid" % filename )
>
> Unfortunately it takes all of two seconds to see what's going to be
> wrong. How can I quote/escape the filename?
from sqlobject.sqlbuilder import _LikeQuoted
connection.queryOne(connection.sqlrepr("SELECT lo_import(" +
_LikeQuoted(filename) + " AS loid"))
Oleg.
--
Oleg Broytmann http://phd.pp.ru/ [EMAIL PROTECTED]
Programmers don't die, they just GOSUB without RETURN.
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
sqlobject-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss