Re: Array as parameter

From: Mark D Powell <Mark.Powell2_at_hp.com>
Date: Thu, 2 Dec 2010 07:15:40 -0800 (PST)
Message-ID: <979fdba7-9c3a-4da7-b05c-2e4e6ae65844_at_g25g2000yqn.googlegroups.com>



On Dec 1, 11:47 am, jodleren <sonn..._at_hot.ee> wrote:
> On Dec 1, 5:12 pm, Mark D Powell <Mark.Powe..._at_hp.com> wrote:
>
>
>
>
>
> > On Nov 30, 11:45 am, jodleren <sonn..._at_hot.ee> wrote:
>
> > > Hi
>
> > > I posted some time ago about this, Mark D Powell answered, and I got a
> > > bit brighter, then other works, and I am back.
>
> > > I have the procedure to call:
>
> > > procedure VarastopaikkaSiirrot(ppSelite Vararasto_pack.vctable,
> > > Function VarastoPaikkaSiirrot2(ppJuoksu in pls_integer,
> > > ppPaikat in Vararasto_pack.intTable,
> > > ppPaikka in pls_integer,
> > > ppMuutos Vararasto_pack.floatTable,
> > > ppMuutos in number,
> > > ppTyyppi in char default 'S'
> > > ppTyyppi in char,
> > > ) is
> > > ppSelite in varchar2) return pls_integer is
>
> > > The point is, that I dont understand the ppSelite, or any parameter I
> > > need to send to it.
>
> > > There seems to be a number of "tables" in here, so what do I need to
> > > do?
> > > As of now I understand a bit, but know nothing
>
> > > Sonnich
>
> > Vararasto_pack.vctable would appear to be a packaged structure.  You
> > would need to declare and populate a collection of this type in your
> > calling code.
>
> > I am pretty sure the example I posted had a pl/sql table (array) type
> > definition, the declaration of the array using the type definition,
> > and an example of a procedure that accepted the array as a parameter.
>
> But where do I find that declaration?
> I have Database Explorer and ToadFree, and I have been looking for
> these declaraitons.
>
> > Since vctable is defined in a package you should be able to look at
> > the package specification for the definition and you may find that the
> > structure is used in some of the package body calls.  If so you have
> > examples that you can review.
>
> How do I find the package?
>
> > Several of the other parameters also appear to be collections so you
> > would need to refer back to their definitions and look for any
> > existing code where these objects are populated and referenced in
> > order to figure out proper use but floatTable and intTable would
> > appear to just be lists of floating point or integer values so the
> > code may not be as complex as it first appears.
>
> You are probably right, but for me new to this it is not so.
> I have a feeling that I have walked in the wrong direction, as I have
> not found some solution yet
>
> Sonnich- Hide quoted text -
>
> - Show quoted text -

Packages are stored in the database and the source (assuming it is not wrapped) is available in dba_source to the owner or a DBA privileged user (or select any catalog) etc .... Or you can use dbms_metadata to generate the source.

There should also be some kind of source code management system in use at your company/customer.

If the package is part of a vendor product and it is wrapped then you are out of luck unless you obtain one of the available third party dewrapping  products available. That or the Vendor documentation contains information on these objects.

HTH -- Mark D Powell -- Received on Thu Dec 02 2010 - 09:15:40 CST

Original text of this message