Re: Calling Database Function from FORMS

From: Steve Cosner <stevec_at_zimmer.csufresno.edu>
Date: 1998/03/19
Message-ID: <6erhrc$es4_at_info.csufresno.edu>#1/1


In article <351011F0.595F_at_domain-tech.com>, Eric Cooper <e.cooper_at_domain-tech.com> wrote:

> I have a function defined in my database schema that takes two dates
> as parameters. I want to call this function from FORMS 4.5, but
> when I try to compile I get an error stating that the function can
> not be used in SQL. I'd rather not have the function in both the
> database and the application as it will make maintenance more
> difficult. Is there a way to call a database function from FORMS???

You can call a function from forms, as in   My_Var := Stored_Function(Date1,Date2);

But you can't use it in a select statement:   Select Col1,Stored_Function(Date_Col1,Date_Col2),Col3... from Some_Table;

This is because Forms uses PL/SQL version 1, which doesn't allow functions within a select.

Forms 5.0 uses PL/SQL v2, so it will work there.

Regards,
Steve Cosner



http://members.aol.com/stevec5088
Downloadable Quick Access utility form: Display and update any table. Received on Thu Mar 19 1998 - 00:00:00 CET

Original text of this message