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

Home -> Community -> Usenet -> c.d.o.misc -> PL/SQL stored procedure returning varray of record type

PL/SQL stored procedure returning varray of record type

From: sukhen <sukhendu1901_at_gmail.com>
Date: Wed, 28 Nov 2007 05:43:16 -0800 (PST)
Message-ID: <71627320-50e9-4567-a8cb-e5df6651fae8@d21g2000prf.googlegroups.com>


hello,
I want the pro*c program to call the stored procedure that will return VARRAY of RECORDS.

Is there a way to recieve in the pro*C program an array of structures returned from the stored procedure? For example, a new version of my stored procedure works like this:

  1. get the data row by row using a cursor.
  2. manipulate the data
  3. put the manipulated data and some other data in record with the following definition: TYPE route_rec IS RECORD ( rt_via VARCHAR2 (30), rt_dist NUMBER(10), rt_id NUMBER (8), rt_comb NUMBER (1) );
  4. each record is thrown into a varray, defined as: TYPE route_data IS VARRAY (10000) OF route_rec;
  5. The stored procedure returns the array to the pro*c program

The problem I have is I don't know how to get the array in the pro*c program
and use the data within it..
Is there any other method to do the same ?

Any suggestions? Received on Wed Nov 28 2007 - 07:43:16 CST

Original text of this message

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