Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: How can I pass Recordsets as input parameter to a Function / Stored Proc ?

Re: How can I pass Recordsets as input parameter to a Function / Stored Proc ?

From: MTNorman <mtnorman_at_duke-energy.com>
Date: 13 Feb 2007 09:28:33 -0800
Message-ID: <1171387713.529007.3000@q2g2000cwa.googlegroups.com>


Just because you are using cursors, doesn't mean you have to use single record cursor loops. Cursors can be bulk collected into a collection that is then processed using "forall". I may disagree with Sybrand concerning the "efficency" of opening and fetching a cursor multiple times over a collection memory reference, but it is easier. Collection passing between PL/SQL routines only works if the "other transaction" is executed in the same call or (when properly coded) by the same session in a sesequent SQL call. The package cursor method works with connection pooling apps where the "other transaction" is coming in a later SQL call and probably from a different session.

If you're not familiar with collection methods, check out the "Application Developer's Guide - Object-Relational Features" manual. Steven Feuerstein's "Oracle PL/SQL for DBAs" has the best write up on collections with code examples. Received on Tue Feb 13 2007 - 11:28:33 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US