Re: Forms 5.0: Parameters for RUN_PRODUCT
Date: Wed, 9 Sep 1998 14:39:58 -0500
Message-ID: <6t6lml$6ri$1_at_nntp.gulfsouth.verio.net>
[Quoted] 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:
- 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 - 21:39:58 CEST
