Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Using Packages in Oracle forms
Make sure that the PL/SQL version you are using under forms 4.5 can support
the query which you are trying to achieve.
I have had problems in the past by implementing something on the server
side, which was a newer version of PL/SQL than the one Forms was using.
Mark
Michael Holm wrote in message <3736C1E2.E634CDC7_at_knold.ballehs.dk>...
>Hi
>
>Yes I have the pragma restrict_references in my package. My package is as
>follows:
>
> package akk is
> function akkdato(p_text in varchar2) return date;
> pragma restrict_references(akkdato,'WNDS','WNPS');
>end akk;
>
>
>
> package body akk is
> function akkdato(p_text in varchar2) return date is
> l_date date;
> begin
> l_date := to_date(p_text,'Day DD Mon YYYY');
>-- e.g
>-- l_date := to_date(p_text,'DD-MON-YYYY');
> return l_date;
> exception
> when others then
> l_date := null;
> return l_date;
> end akkdato;
>end akk;
>
>
>
>Andy Hardy wrote:
>
>> In article <3736A44B.C7E45969_at_knold.ballehs.dk>, Michael Holm
>> <datb9812_at_knold.ballehs.dk> writes
>> >Hi
>> >
>> >i'm trying to use a package that I have created user forms 4.5. I keep
>> >getting this error: Funktion 'text_to' may not be used in SQL. I have
>> >created the package with the funktion but it won't work. I'm tried it
>> >under the SQL program for forms and then it worked, I just don't know
>> >why it didn't worked under Foms.
>> >
>>
>> Can you show us the package declaration and your call to the package?
>>
>> The package is compiled on your database, and the call works from
>> SQL*Plus?
>>
>> Have you put RESTRICT_REFERENCES in the package declaration? E.G
>>
>> PACKAGE return_value
>> IS
>> FUNCTION material_description (p_material_id
>> materials.material_id%TYPE)
>> RETURN VARCHAR2
>> ;
>> PRAGMA RESTRICT_REFERENCES(material_description, WNDS, WNPS);
>> END;
>> --
>> Andy Hardy. PGP key available on request
>> ===============================================================
>
>
>
Received on Mon May 10 1999 - 07:16:07 CDT
![]() |
![]() |