Re: [cx-oracle-users] Inserting on table where is CLOB column
Brought to you by:
atuining
From: Charl P. B. <cp...@gm...> - 2005-05-17 18:18:56
|
On 5/17/05, Jani Tiainen <re...@lu...> wrote: > When I'm trying to insert long text in CLOB column I get error > ORA-01461. Something like LONG value can be only to be bind in LONG colum= n. >=20 > It should be CLOB instead of LONG. Is there way to get around this proble= m? >=20 > When value is less than 4000 chars inserts goes well, but after breaking > barrier problem occurs. >=20 > Using cx_Oracle 4.1 with Python 2.3, Windows XP, Oracle 10g It looks like you have to use bind variables. This is from an example Anthony posted on this list to answer one of my questions: connection =3D cx_Oracle.Connection("user/pw@tns") cursor =3D connection.cursor() cursor.setinputsizes(value =3D cx_Oracle.CLOB) cursor.execute("insert into table values (:value)", value =3D "A very long string") HTH, Charl --=20 charl p. botha http://cpbotha.net/ http://visualisation.tudelft.nl/ |