[cx-oracle-users] How to insert LOB/CLOB/BLOB ??
Brought to you by:
atuining
From: <vi...@cs...> - 2003-09-03 12:46:23
|
Hi all, I am new to this list and also to the cx_Oracle package. Previously I was working with other database systems with Python. I recently switched to Oracle and cx_Oracle. Now I am learning to use this package using the tests provided with package. But I am facing problems in inserting large object data in tables. I have a table as : clob(id integer PK,clobval clob NN) Now I try to insert some data in it: >>longString="abcd"*2500 >>cur=con.cursor() >>cur.setinputsizes(pstr=cx_Oracle.LONG_STRING) >>cur.execute("insert into testclob values(:pint,:pstr)",pint=1,pstr=longString) But here I gets error: cx_Oracle.DatabaseError: ORA-01461: can bind a LONG value only for insert into a LONG column Please Help.. I am using Python 2.3/cx_Oracle 3.1/ Oracle 8.1.5 on Windows 2k (SP4). TIA and Kind Regards, Vivek Kumar |