- Original Message -
From: "Matthew T. Kromer" <[EMAIL PROTECTED]>
To: "Maan M. Hamze" <[EMAIL PROTECTED]>
Cc:
Sent: Tuesday, March 20, 2007 8:17 PM
Subject: Re: [Zope-DB] DCOracle2 with a Stored Procedure that Returns a
ref_cur
If I recall, DCOra
If I recall, DCOracle2 returns an array of the OUT parameters from
invoking a stored procedure, so your invocation would be more like
c2 = c1.sp1(in1, in2, in3, in4) and you wouldn't pass in ref_cur
but its been a while since I reviewed the code. I know ref cursors
used to work...
On Mar
options = "(2714, " + "'" + "" + "'," + "36, 1, c2)"
it's wrong!
you must give a sequence as second parameter of execute method.
So you do like this:
options = (2714, '',36, 1, c2)
c1.execute(sql, options)
Maan M. Hamze a écrit :
> Hello -
> Thanks for your help. I am still ge
> I am using DCOCralce2 with Python 2.41, and Oracle 9.
> I have a stored procedure (sp1) that takes 4 IN parameters, with one OUT
> parameter. The OUT parameter is a **ref_cursor** that holds a data set.
> I am doing the following:
> db = DCOracle2.connection(connectionString)
> C1 = db.cursor()
you can do it like this:
db = DCOracle2.connection(connectionString)
C1 = db.cursor()
C2 = db.cursor()
sql = "sp1(INparam1, :INparam2, :INparam3, :INparam4, :ref_cur)"
C1.execute(sql, (INparam1, INparam2,INparam3,INparam4, C2))
for row in C2:
...
Maan M. Hamze a écrit :
I am using DCOCralce2
I am using DCOCralce2 with Python 2.41, and Oracle 9.
I have a stored procedure (sp1) that takes 4 IN parameters, with one OUT
parameter. The OUT parameter is a **ref_cursor** that holds a data set.
I am doing the following:
db = DCOracle2.connection(connectionString)
C1 = db.cursor()
C2 = db.curs