Re: [cx-oracle-users] cx_Oracle.InterfaceError: not a query
Brought to you by:
atuining
From: John N. <mr....@gm...> - 2010-10-11 01:26:50
|
About the string concatenation, do you usually just use dictionaries? I understand that's more Pythonic. I should probably do that. At any rate, my workaround was a dump of all the SQL statements to a file and running that against the database. On Sun, Oct 10, 2010 at 10:05 AM, Robert <web...@gm...> wrote: >>>>> if update_flag: >>>>> # >>>>> # If an update is necessary, print row's PK value >>>>> print "\tChange needed for %s = %d" % (uid_col, uid) >>>>> update_query = "update " + full_name + " " + \ >>>>> "set " + column + \ >>>>> " = '" + returned_string + "' " +\ >>>>> "where " + uid_col + \ >>>>> " = " + str(uid) >>>>> cur.execute(query) >>>>> >>>>> conn.close() > > > personally I hate writing and reading string concat code like this. > I would dump the SQLs to a file and read back in and execute in iteration. > I like viewing exactly what I send to Oracle. > ------------------------------------------------------------------------------ > Beautiful is writing same markup. Internet Explorer 9 supports > standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3. > Spend less time writing and rewriting code and more time creating great > experiences on the web. Be a part of the beta today. > http://p.sf.net/sfu/beautyoftheweb > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > -- John Nielson mr....@gm... (504) 344.7225 |