Re: [cx-oracle-users] cx_Oracle.OBJECT as param?
Brought to you by:
atuining
From: Anthony T. <ant...@gm...> - 2010-05-11 14:08:13
|
Hi, You aren't doing anything wrong. Object support is not available in cx_Oracle at the moment. Its the top item at the moment -- but I've had very little time recently to even look at it so don't count on it anytime in the near future, unfortunately. Anthony On Tue, May 11, 2010 at 1:33 AM, Tobias Sauerwein <tob...@ca...> wrote: > 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 > > ------------------------------------------------------------------------------ > > > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > > |