Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Passing Table of records in PL/SQL
Can you pass a table of records from a C/C++ program to a stored procedure?
We're in the design phase right now, and am being told we will have to
insert the data into a tempory table from the C program to be used by the
stored proc. any insights?
Thanks,
Muralidhar Prabhakaran <muralip_at_earthlink.net> wrote in message
news:E3Nm4.2254$563.90740_at_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 Mon Feb 07 2000 - 19:18:48 CST
![]() |
![]() |