Re: [cx-oracle-users] callfunc of a PL/SQL function returning REFCURSOR does not work
Brought to you by:
atuining
From: Steinmann D. <Dan...@co...> - 2006-08-10 15:39:03
|
On Thursday, August 10, 2006 4:43 PM, Anthony Tuininga wrote: > The only reason ref cursors weren't supported as return values from > functions is simply because I never use such techniques and so never > found the need for adding such support. :-) I have now done that. Cool! I checked http://cx-oracle.cvs.sourceforge.net/cx-oracle/cx_Oracle/ but could not see any code change. I guess you do not keep the sources there, right? If it is not too much hassle for you: Can you send me a patch of this change so I can try it on my machine? > In the meantime, you can either change the function into a procedure > with an out parameter or you can run the following code instead.... =20 >=20 > result =3D connection.cursor() > statement.execute("begin :result :=3D my_pack.my_func_cursor(:arg); > end;", result =3D result, arg =3D 5) > for row in result: > print "Row:", row >=20 > Not as pretty but it works. :-) Hope that helps. Nice idea. I will use this approach in the meantime. Thanks for the quick response, Daniel |