Re: unsupported construct or internal error [2601]

From: DanHW <danhw_at_aol.com>
Date: 2000/05/19
Message-ID: <20000518221253.06026.00000124_at_ng-ck1.aol.com>#1/1


>Hello!
>
>When I make the call from forms6i to stored function:
>tmp := Pkg.Test( nId);
>
>which is declared as
>Function Test( pId IN NUMBER, pDate IN DATE := SYSDATE)
>on Oracle Server 8.1.6 for NT.
>
>I get the following:
>unsupported construct or internal error [2601]
>
>But when the call looks like
>tmp := Pkg.Test( nId, sysdate);
>everything is OK!
>The problem is that we're moving from 7.3.4 and our existing application
>contains
>too many such calls where default parameters are not explicitly stated.
>Is there any
>way to solve this problem except rewriting procedure calls in forms?

If you change the definition of the procedure to use a DEFAULT NULL value, then you do not have pass the parameters to the procedure. Inside function TEST you can check for a null condition and provide the default. I don't recall if that particular process happens only with a NULL, or with any DEFAULT value. The other option is to overload the function...

function test (pld in number, pdate in date) ...
return xxx;
end;

function test (pld in number) is
begin

    return test(pld, sysdate);
end;

As long as the calls are different in datatype/number of parameters, you can overload it and Oracle will figure out which one to call.

Dan Hekimian-Williams
...
return ...
end; Received on Fri May 19 2000 - 00:00:00 CEST

Original text of this message