[cx-oracle-users] Oracle Error :: ORA-01484 arrays can only be bound to PL/SQL statements
Brought to you by:
atuining
From: Wong W. Meng-R. <r3...@fr...> - 2011-11-30 11:23:22
|
Hello there, I am continuing on my python 1.5.2 to 2.7.1, oracledb to cx_Oracle conversion project. My application server is coded with following SQL statements and arguments in one of the API. My NLS_LANG setting caused the error description not displayable in English but the description has been stated in the subject of this email. By design of the applicaiton, the ATTR_VALUE column can store value in python list format. I will encounter the same error no matter the value is an empty list or a list with elements. Is there a workaround to this in cx_Oracle, like overriding the inputtypehandler for the cursor object? The code used to be working fine in oracledb. Regards, Wah Meng >> cmd="insert into MES_ATTRIBUTE_HISTORIES (ENTITY_TYPE, ENTITY_ID, ATTR_NAME, SET_TIME, SET_USER_ID, ATTR_VALUE, COMMENTS, RCDE_ID) values ('ALOT', :1, :2, :3, :4, :5, :6, :7)" >> arg=('TJMEA12KAH00', 'wipRack', (2011, 11, 25, 9, 55, 30), 'R33088', [], None, None) >>> a.execute(cmd, arg) Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/r32813/genesis/GEN_DEV_271/Product/Lib/EComponent.py", line 896, in __call__ raiseAppExc(sys.exc_info()[0].__name__, sys.exc_info()[1].__str__()) File "/home/r32813/genesis/GEN_DEV_271/Product/Lib/EComponent.py", line 191, in raiseAppExc raise excClass(value) EComponent.DatabaseError: ORA-01484: ?????? PL/SQL ???? Regards, Wah Meng |