Re: Forms 5.0: Parameters for RUN_PRODUCT

From: Marc A. Tolson <marct_at_mail.rdc.noaa.gov>
Date: Wed, 09 Sep 1998 16:36:07 -0400
Message-ID: <35F6E6B7.D7BF17CA_at_mail.rdc.noaa.gov>


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_at_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_at_noaa.gov
> >
Received on Wed Sep 09 1998 - 22:36:07 CEST

Original text of this message