PL/SQL stored procedure returning varray of record type -
11-28-2007
, 07:43 AM
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? |