Constructing a DCOracle2 BindingArray to match an OUT parameter
Hopefully this is not OT for this list. I am having trouble understanding how to construct a BindingArray object to match and OUT param being used in one of my stored procedures. The OUT is defined in the PACKAGE as: TYPE result_rec is RECORD ( sample_id wells.sample_id_dn%TYPE, ... etc ... ); TYPE result_table IS TABLE OF result_rec index by BINARY_INTEGER; PROCEDURE get_qc_report ( result_tab_io IN OUT result_table, ... etc ... ) If I try to pass in (just guessing), for example: results = cnx.BindingArray(1, 9, 'SQLT_REF') All I get is an "ORA-00000" results = cnx.BindingArray(1, 9, 'SQLT_RSET') segfaults and brings down my Zope ... I'm not sure what kind of BindingArray I should be using.
John Ziniti wrote:
Hopefully this is not OT for this list. I am having trouble understanding how to construct a BindingArray object to match and OUT param being used in one of my stored procedures. The OUT is defined in the PACKAGE as:
TYPE result_rec is RECORD ( sample_id wells.sample_id_dn%TYPE, ... etc ... );
TYPE result_table IS TABLE OF result_rec index by BINARY_INTEGER;
PROCEDURE get_qc_report ( result_tab_io IN OUT result_table, ... etc ... )
If I try to pass in (just guessing), for example:
results = cnx.BindingArray(1, 9, 'SQLT_REF')
All I get is an "ORA-00000"
results = cnx.BindingArray(1, 9, 'SQLT_RSET')
segfaults and brings down my Zope ...
I'm not sure what kind of BindingArray I should be using.
Generally the code will try to make Binding Arrays for you -- however, it doesn't handle (I dont think) multi-column table form. It does handle simple single-column result tables, in which case the type of the binding array (if you use it manually) is your column type. The code *does* handle return of cursors properly -- so if you can arrange to return a cursor into your table that will work fine. Matt Kromer Zope Corporation http://www.zope.com/
Matt, thanks for your response. A few questions:
Generally the code will try to make Binding Arrays for you -- however,
it doesn't handle (I dont think) multi-column table form.
Is this a planned feature? Is it something that someone new to dco2.c could figure out how to implement? Any hints?
The code *does* handle return of cursors properly -- so if you can arrange to return a cursor into your table that will work fine.
No such luck. The PL/SQL author tells me there's no way to return a CURSOR on the PL/SQL table.
participants (2)
-
John Ziniti -
Matthew T. Kromer