[Zope] Oracle Stored Procedures
Ernst Eeldert
Eeeldert@landis.nl
Fri, 10 Aug 2001 09:57:01 +0100
Ricardo,
first off all, stop sending HTML messages to this list. Thanks.
Basically, the ZOracle Stored Procedure object returns a list containing the
OUT parameters of your procedure. So when you have a Oracle Procedure like:
procedure test
(
p_claim_id in varchar2
,p_cursor out cur_general
,p_error_code out number
);
calling the ZOracle Stored Procedure (ZSP) from DTML will return a list
containing 2 items. The first will contain a DCO2 cursor object, the second
item will be the numeric errorcode.
In DTML, you can use the cursor just like from python, as long as you put it
into an expression. Example:
<dtml-in expr="spTest()[0].fetchall()">
<li><dtml-var expr="_['sequence-item'][0]>
</dtml-in>
This will print a list with the values of the first column of each row. It
could be that the syntax of the dtml-var tag could be less hairy, but I just
started using Zope, and I know this syntax works for me.
HTH,
Ernst
-----Original Message-----
From: ricardo@cnbe.mar.org.uk [mailto:ricardo@cnbe.mar.org.uk]
Sent: Friday, August 10, 2001 10:20 AM
To: Zope
Subject: [Zope] Oracle Stored Procedures
Hi
Does anyone knows how to receive a Refence Cursor variable from
a stored procedue? If a stored Procedure get a result set in a query
and I want to pass this resul set as output from my ZSP how do I do it?
How can I do it in Zope. I saw some examples in Python by I don't know how
to
do it from zope.
TIA
Ricardo