Re: PACKAGES, TYPES and STORED PROCEDURES

From: Jusung Yang <JusungYang_at_yahoo.com>
Date: 5 Feb 2003 16:46:53 -0800
Message-ID: <130ba93a.0302051646.30987d18_at_posting.google.com>


Do these ref cursors have to be strongly typed? If not, you can just use a weakly type ref cursor for all your funcitons that return a ref cursor. You don't even have to declare one yourself and just use the SYS_REFCURSOR.

  • Jusung Yang

azp74_at_hotmail.com (Alex) wrote in message news:<dca1064b.0302050906.1d91091b_at_posting.google.com>...
> Hi
>
> Hopefully the answer to this is really simple.
>
> I have a package (myPackage) which has two types declared in it: one
> a record (say type A) and the other a ref cursor of that record (say,
> type B is ref cursor return A).
>
> I have a function which returns the ref cursor from the package:
> myFunction (...) returns myPackage.B as ...
>
> Now I have an OCI application which builds up and then executes PL/SQL
> blocks.
>
> The PL/SQL I have built by hand is:
>
> declare output myPackage.B;
> begin
> :output = myFunction(...);
> end;
>
> This is bound, prepared and executed OK but my problem is how to
> generate this PL/SQL block as I cannot find a reference to "B" in the
> system catalogues. I have found that the all_arguments catalogue will
> give me "myPackage" and that another one will give me "A" but it
> appears that the only way I can get "B" is to use all_source and parse
> the text returned. This is unacceptable/undesirable in terms of
> performance of my application.
>
> I am using Oracle 9.2.0.1.0 on Windows and the coding I've done for
> the packages etc has been done through the enterprise manager, which
> hasn't complained, though if I've done something wrong please tell me.
>
> I've trawled through the 9i database reference manual, both searching
> on package and just looking/reading, but I've been able to find what I
> need. I hope someone knows!
>
> TIA
> Alex
Received on Thu Feb 06 2003 - 01:46:53 CET

Original text of this message