Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Returning an array from a procedure/ function
a_person_uk_at_yahoo.co.uk (Simon Davies) wrote in message news:<6238724c.0307070148.b56dc11_at_posting.google.com>...
> "Ryan" <rgaffuri_at_cox.net> wrote in message news:<mn4Oa.9373$ZT5.3228_at_news2.east.cox.net>...
>
> > im assuming your coming from an Object oriented backgroudn because
> >
> > MyArray ARRAY := ARRAY('','','','','','','','','','','','','','','');
> >
> > as a constructor. its not necessary. Arrays are wrapped in Oracle.
> > Initialization is taken care of for you.
>
> OK. I have a function which returns an array working. However the code
> doesn't work when I use dynamically sized arrays (using
> array.extend;). This is because the array being returned is a
> different size to the array which I am assigning the result of the
> function to. How can I get around this problem?
>
> Cheers,
>
> Simon.
varray is a static array
pl/sql table is a dynamic sparse array. However, you can still get
null pointer exceptions with it.. which is annoying.
are yo using a varray? switch to a pl/sql table. initializations is virtually the same. it never needs to be extends. Its all wrapped. I rarely see varray used and only when you want to store the array in a table which you cant do with pl/sql tables.
this should fix your problem. if not provide a code snipped and the error message.
im right your a c/c++ programmer right? Received on Thu Jul 10 2003 - 06:39:22 CDT