[Zope-DB] Can't get DCOracle2 to work with Python in Zope

Bo M. Maryniuck b.maryniuk at forbis.lt
Wed Nov 5 05:23:18 EST 2003


On Wednesday 05 November 2003 10:51, Chris Withers wrote:
> > I need to call Stored Procedures with IN and Out parameters.
> Do Z Oracle Stored Procedure objects not let you do this?

Yes and no. AFAIK, current implementation of StoredProcedures for Zope allows 
you only get OUT parameters back (with annoying caveats, such as 
OracleDateTime type are not supported etc.). E.g.:

FUNCTION FOO(IN_PARAMETER IN VARCHAR2,
             OUT_PARAMETER IN OUT VARCHAR2)

Then, e.g. SP exist in ZODB as "foo", you should just pass empty string in 
this case:

outParameter = context.foo(in_parameter = "Joe", 
                           out_parameter = '')

To use both IN/OUT as usually normal parameters, you should (somehow) use 
binding array (espesially in case of overloaded procedures) or use another 
procedure call (refer to DCOracle2 documentation at 
http://www.zope.org/Members/matt). But both of them are not implemented in 
ZOracleDA, they only present in DCOracle2 adapter as is.

To solve this, you need to improve ZOracleDA by these stuff. ;-)

-- 
Regards, Bogdan M.Maryniuck

System programmer, Forbis UAB





More information about the Zope-DB mailing list