Re: [cx-oracle-users] Calling a stored procedure with REFCUR out parameter
Brought to you by:
atuining
From: Anthony T. <ant...@gm...> - 2005-10-24 15:58:44
|
Take a look at the fragment in test/CursorVar.py. I'll replicate the relevant portion here for your convenience. cursor =3D self.connection.cursor() self.cursor.callproc("pkg_TestOutCursors.TestOutCursor", (2, cursor= )) In other words, simply create a cursor and bind it to the procedure using the callproc method. Hope that helps. On 10/24/05, Di...@ao... <Di...@ao...> wrote: > > I got Oracle stored procedure, which looks like: > > PROCEDURE get_list(param1 IN VARCHAR2, param2 IN VARCHAR2, summary_cur OU= T > REFCUR). > IS > sql_stmt VARCHAR2(4000); > BEGIN > sql_stmt =3D 'SELECT a,b,c,d FROM Tab1, Tab2 WHERE Tab1.x =3D :param1 AND= Tab2.y > =3D :param2;' > OPEN summary_cur FOR sql_stmt USING param1, param2; > END get_list; > > Usually it returns more than 1 row. > > How can call this procedure, using cx_Oracle? To be more specific, how to > specify the output parameter? > > Regards, > Dmitriy Arapov > |