[cx-oracle-users] Question on calling stored procedures using cx_Oracle
Brought to you by:
atuining
From: Lear, R. <Rus...@xe...> - 2006-04-10 17:50:12
|
Hi all, I'm a (mostly) happy user of cx_Oracle, but I've found one hole that I'd like to find a solution to. I'm running I have a stored procedure looking like=20 PROCEDURE RestartableJobs(c_djob OUT djob_cursor) IS =20 BEGIN =09 OPEN c_djob FOR 'SELECT distinct job_id from jobtable=20 where status < cnStatusRejected and exists (select null from activejobs where activejobs.job_id =3D jobtable.job_id)'; NULL;=09 END RestartableJobs;=09 How do I call this thing? (or do I?) Clearly, in this case I could pass in the sql myself, but duplicating existing PL/SQL code isn't too attractive. >>> import cx_Oracle as cxo >>> connection =3D cxo.connect('scott/tiger') >>> cur =3D connection.cursor() >>> r =3D cur.callproc('rlpkg.RestartableJobs') Traceback (most recent call last): File "<stdin>", line 1, in ? cx_Oracle.DatabaseError: ORA-06550: line 1, column 7: PLS-00306: wrong number or types of arguments in call to 'RESTARTABLEJOBS' ORA-06550: line 1, column 7: PL/SQL: Statement ignored But I can't figure out what to pass in to it. Any hints? For what it's worth, I'm on WinXP, using Oracle 9i, with cx_Oracle 4.1.2. Thanks, Russell. |