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 -> Re: Passing Table of records in PL/SQL

Re: Passing Table of records in PL/SQL

From: Muralidhar Prabhakaran <muralip_at_earthlink.net>
Date: Sat, 05 Feb 2000 03:47:48 GMT
Message-ID: <E3Nm4.2254$563.90740@newsread1.prod.itd.earthlink.net>


How are you defining your table of records. Is it within a package or is it in a stand alone script. if the type is defined in a separate script and the procedure is being called using another script then the type is not recognized...

   The solution is to define a package and define all the table and record types there. Then use the data types u defined in a procedure!! That should work.

By the way you can pass a table of records to a procedure. I have done that

--
Murali
"If u haven't crashed your server you haven't worked enough" RC <rclarence_at_tyc.com> wrote in message news:s9mkogkedh156_at_corp.supernews.com...
> I have defined a table of records as follows
>
> Type rec_type is RECORD (
> colA table.colA%TYPE,
> colB table.colB%TYPE,
> colC table.colC%TYPE
> );
>
> TYPE tab_recs IS TABLE OF rec_type INDEX BY BINARY_INTEGER;
>
> I then define a variable of type tab_recs i.e.
>
> l_tab tab_recs;
>
> I do some processing to load my table full of information and then I want
> to pass this tab to a procedure to print all the rows.
>
> So I defined a procedure as follows
>
> PROCEDURE printem (p_table IN tab_recs);
>
> When I call printem via
>
> printem(l_tab);
>
> I get a value error. Is this possible? Am I doing it wrong or do I just
> have to pass each record in a loop?
>
> TIA
>
> RHC
>
> --
> Posted via CNET Help.com
> http://www.help.com/
Received on Fri Feb 04 2000 - 21:47:48 CST

Original text of this message

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