[cx-oracle-users] cx_Oracle.OBJECT as param?
Brought to you by:
atuining
From: Tobias S. <tob...@ca...> - 2010-05-11 07:33:32
|
Hi! I am trying to use an object of type cx_Oracle.OBJECT as query argument, but I am receiving an error message. Is it not supported by cx_Oracle, or am I doing something wrong? My code looks like this: >>> curs = conn.cursor() >>> curs.execute("select sdo_geometry('POINT(0 0)', 4326) from dual") <__builtin__.OracleCursor on <cx_Oracle.Connection to system@ (DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=172.16.101.131)(PORT=11432)))(CONNECT_DATA=(SID=gis)))>> >>> obj = curs.fetchone()[0] >>> obj <cx_Oracle.OBJECT object at 0x8c9c320> >>> curs2 = conn.cursor() >>> curs2.execute("select sdo_util.to_wktgeometry(:arg) from dual", arg=obj) Traceback (most recent call last): File "<stdin>", line 1, in <module> cx_Oracle.NotSupportedError: Variable_TypeByValue(): unhandled data type cx_Oracle.OBJECT Thanks, Tobias |