Re: developer 2000...global variables

From: Paul Dorsey <pdorsey_at_dulcian.com>
Date: 2000/03/01
Message-ID: <440v4.28113$pN1.352579_at_news1.rdc1.nj.home.com>#1/1


To acomplish what you want there are 2 alternatives: 1) Put an anonymous pl/SQL block around your call to the global ...
begin

   local := :global.directory;
exception
  when others then
    null;
end;
if local = 'Y' then

   <whatever>
end if;

However, what you should be doing is

2) Pass a parameter from A to B using a parameter list, then check the value of the parameter.
This would require no DB access (unlike your method).

Paul Dorsey
Dulcian, Inc.
(212) 595-7223
web address: http://www.dulcian.com
email: pdorsey_at_dulcian.com

<ssharma24_at_my-deja.com> wrote in message news:89htmu$ocb$1_at_nnrp1.deja.com...
> I am using call-form built in:
> Form 'A' calls form 'B'
>
> I initialize a global variable in Form A
> Saying :
> :global.directory := 'y';
>
> then in "when new form instance" trigger of form B, I put an if
> statement saying :
> If (:global.directory = 'y') then..statements.
>
> So, that when form B is called, Form B will know that it's been called
> from form A.
>
> This works fine when I call form B from form A.
>
> The problem arises when I try to use only the form B (i.e. when I am
> not calling it from A). At this time it gives me an error saying
> that :error frm-40785 :global.directory variable does not exist.
>
> Please help..
>
> Thanks.
>
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
Received on Wed Mar 01 2000 - 00:00:00 CET

Original text of this message