dbTalk Databases Forums  

PL/SQL stored procedure returning varray of record type

comp.databases.oracle.misc comp.databases.oracle.misc


Discuss PL/SQL stored procedure returning varray of record type in the comp.databases.oracle.misc forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
sukhen
 
Posts: n/a

Default 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?

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.