Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Using Packages in Oracle forms

Re: Using Packages in Oracle forms

From: Michael Holm <datb9812_at_knold.ballehs.dk>
Date: Mon, 10 May 1999 13:24:18 +0200
Message-ID: <3736C1E2.E634CDC7@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 - 06:24:18 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US