Xref: alice comp.databases.oracle.tools:16277
Path: alice!news-feed.fnsi.net!news.maxwell.syr.edu!cpk-news-hub1.bbnplanet.com!news.bbnplanet.com!nyd.news.ans.net!newsfeeds.ans.net!rdc.noaa.gov!not-for-mail
From: "Marc A. Tolson" <marct@mail.rdc.noaa.gov>
Newsgroups: comp.databases.oracle.tools
Subject: Re: Forms 5.0: Parameters for RUN_PRODUCT
Date: Wed, 09 Sep 1998 16:36:07 -0400
Organization: DOC/NOAA
Lines: 64
Message-ID: <35F6E6B7.D7BF17CA@mail.rdc.noaa.gov>
References: <6t48ip$k6v$1@nntp.gulfsouth.verio.net> <35F67E72.8B490D9E@mail.rdc.noaa.gov> <6t6lml$6ri$1@nntp.gulfsouth.verio.net>
Reply-To: Marc.A.Tolson@noaa.gov
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Mailer: Mozilla 4.04 [en] (Win95; U)

Excellent !!!  I had a feeling the function overloading had something to
do with the problem but the Oracle representative would not confirm  so.

Marc Tolson

Todd Owers wrote:
> 
> Thanks, Marc, for your response.  As you said, this is a bug in Forms 5.0.
> In addition to the workaround you suggested, I discovered two more
> workarounds:
> 
> 1. Use named, rather than positional, notation in the call to RUN_PRODUCT,
> as follows:
> 
> RUN_PRODUCT(REPORTS,'my_report.rdf',SYNCHRONOUS,RUNTIME,FILESYSTEM,'NAME=>NU
> LL');
> 
> 2. Use TO_CHAR(NULL), as follows:
> 
> RUN_PRODUCT(REPORTS,'my_report.rdf',SYNCHRONOUS,RUNTIME,FILESYSTEM,TO_CHAR(N
> ULL));
> 
> The reason for the bug is that Forms 5.0 uses PL/SQL Version 2.3, whereas
> Forms 4.5 uses PL/SQL Version 1.1.  PL/SQL Version 2.3 supports overloaded
> program units, and distinguishes between them by looking at the datatypes of
> the actual arguments.  For its 6th argument, RUN_PRODUCT allows either a
> parameter list name (in which case the datatype of the actual argument is
> VARCHAR2) or a parameter list id (in which case the datatype of the actual
> argument is PARAMLIST).  NULL can apply to both VARCHAR2 and PARAMLIST
> datatypes; consequently, the compiler cannot determine which version of
> RUN_PRODUCT is being invoked, so it returns the PLS-00307 error.
> 
> Using named notation solves the problem because the NAME=>NULL parameter
> explicitly tells PL/SQL to use the version of RUN_PRODUCT that has the 6th
> argument of datatype VARCHAR2.  This eliminates the ambiguity in the call to
> RUN_PRODUCT.  Similarly, the use of TO_CHAR(NULL) explicitly signifies a
> datatype VARCHAR2.
> 
> Todd Owers
> 
> Marc A. Tolson wrote in message <35F67E72.8B490D9E@mail.rdc.noaa.gov>...
> >NULL is not a valid option for the parameter list argument.  You must
> >create a blank parameter list.  Below is an example:
> >
> >Declare
> >
> >pl ParamList;
> >
> >Begin
> > run_product(REPORTS, 'my_report', SYNCHRONOUS, RUNTIME, FILESYSTEM, pl,
> >NULL);
> >
> >End;
> >
> >This is a bug in the version of Oracle Forms 5.0.6.8.0
> >
> >Hope this helps,
> >
> >
> >Marc Tolson
> >Programmer Analyst
> >Department of Commerce, NOAA
> >Marc.A.Tolson@noaa.gov
> >
