Re: [cx-oracle-users] insert LONG RAW into table
Brought to you by:
atuining
From: Anthony T. <ant...@gm...> - 2010-12-07 05:31:36
|
Hi, I don't see the problem you are having just by looking at it. All __looks__ right. Are you able to successfully use the same code as is found in the LongVar test code? cursor.setinputsizes(longString = cx_Oracle.LONG_BINARY) cursor.execute(""" insert into TestLongRaws ( IntCol, LongRawCol ) values ( :intVal, :longString )""", intVal = 5, longString = "A" * 25000) The likelihood is that perhaps msg_id is an integer but you are passing sys_guid() to it which is a raw (BINARY) value? Slowly remove bits of the code until the problem goes away as the code you have should in theory work -- I use similar code regularly enough! Anthony On Mon, Dec 6, 2010 at 11:34 AM, Jeffrey Melloy <jm...@gm...> wrote: > I'm having trouble inserting a long raw into a table. > My update statement is this: > insert = """insert into amazonmp.transmission_in (msg_id, key_value, > key_value2,msg_body) > values (sys_guid(), :ref_id, :resp_id, :msg_body)""" > After doing this: > upd.setinputsizes(msg_body=cx_Oracle.LONG_BINARY) > upd.execute(insert, {"msg_body":doc.xml_encode(), "ref_id":ref_id, > "resp_id":str(id)}) > I always get this error: > cx_Oracle.DatabaseError: ORA-00932: inconsistent datatypes: expected NUMBER > got BINARY > Any help would be appreciated. > This is using cx_Oracle 5.03 connecting to a 10g DB. > -Jeff > ------------------------------------------------------------------------------ > What happens now with your Lotus Notes apps - do you make another costly > upgrade, or settle for being marooned without product support? Time to move > off Lotus Notes and onto the cloud with Force.com, apps are easier to build, > use, and manage than apps on traditional platforms. Sign up for the Lotus > Notes Migration Kit to learn more. http://p.sf.net/sfu/salesforce-d2d > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > > |