[cx-oracle-users] using bind variables to insert into xmltype colums
Brought to you by:
atuining
From: Charl P. B. <cp...@gm...> - 2005-04-07 23:33:57
|
Dear list, I'm trying to insert xml into xmltype columns. My xml is longer than 4000 characters, so I get "ORA-01704: string literal too long" if I try and insert my xml as a string literal: cursor.execute("insert into table xmltable values(xmltype('<xml>very long string...</xml>'))") As far as I could see, it seems one is supposed to use bind variables in cases such as these. So I tried something similar to the following: xml_clob = cx_Oracle.CLOB cursor.execute("insert into table xmltable values(xmltype(:xml_clob))", xml_clob = '<xml>very long string...</xml>') This yields a: "ORA-01461: can bind a LONG value only for insert into a LONG column". How else can I insert long XML strings into xmltype columns from cx_Oracle? A temporary column of sorts? Any tips on this would be greatly appreciated! Thanks, Charl -- charl p. botha http://cpbotha.net/ http://visualisation.tudelft.nl/ |