[cx-oracle-users] Re: Inserting on table where is CLOB column
Brought to you by:
atuining
From: Jani T. <re...@lu...> - 2005-05-17 18:49:57
|
Charl P. Botha kirjoitti: > 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 column. >> >>It should be CLOB instead of LONG. Is there way to get around this problem? >> >>When value is less than 4000 chars inserts goes well, but after breaking >>barrier problem occurs. >> >>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 = cx_Oracle.Connection("user/pw@tns") > cursor = connection.cursor() > cursor.setinputsizes(value = cx_Oracle.CLOB) > cursor.execute("insert into table values (:value)", > value = "A very long string") Didn't saw that in list. It would solve my problem if I knew queries before, but... Problem is that I haven't got control over bindings since code is basically just code below: def runquery(cursor, query, args): return cursor.execute(query, args) Any ideas? -- Jani Tiainen |