Re: Setting global variables in FORMS 5

From: David Williams <david.williams_at_daytonoh.ncr.com>
Date: 1998/04/14
Message-ID: <01bd67c9$e5be8e00$be531995_at_aohemd6willid1.DaytonOH.NCR.COM>#1/1


Tried changing the code to that below but I get exactly the same problem. As soon as I remove the line:

        :GLOBAL.user_id := TO_CHAR(:ENV_USERS.user_id);

the problem goes away so obviously the problem is linked to this line of code but I have no idea why !

Dave.

Michael Krolewski <vandra_at_u.washington.edu> wrote in article <353314AA.9B84A834_at_u.washington.edu>...
> I am not sure why or what you are doing but I would guess that
> the fact that the "into" clause and the "where" clause contain the same
> variables is most likely the problem.
>
> you probably want:
> select user_id
> into :ENV_USERS.user_id
> from env_users
> where user_name = :ENV_USERS.username
> and password = :ENV_USERS.user_password
> and active = 'Y';
>
>
> David Williams wrote:
>
> > All,
> > I've got something really weird happening. If anyone knows how
 to fix this
> > I would be really grateful. I have the following trigger set up:
> > KEY-NEXT-ITEM with the following code :-
> >
> > begin
> > select user_name, password, user_id
> > into :ENV_USERS.username,
> > :ENV_USERS.user_password,
> > :ENV_USERS.user_id
> > from env_users
> > where user_name = :ENV_USERS.username
> > and password = :ENV_USERS.user_password
> > and active = 'Y';
> >
> > :GLOBAL.user_id := TO_CHAR(:ENV_USERS.user_id);
> >
> >
> > NEW_FORM('C:\ORAWIN95\FORMS50\Localisations\Quickcodes');
> >
> > exception
> > when no_data_found then
> > message ('Username/Password not valid');
> > go_item('ENV_USERS.username');
> > raise form_trigger_failure;
> >
> > end;
> >
> > Everytime this trigger fires I get the following error when it tries to
> > open the new form :-
> >
> > F50DBG32 caused a stack fault in module F50COM32.DLL at 0157:5d41fad8.
> > Registers:
> > EAX=00b1ca10 CS=0157 EIP=5d41fad8 EFLGS=00010246
> > EBX=00000001 SS=015f ESP=00aef558 EBP=00000000
> > ECX=00b14968 DS=015f ESI=00000001 FS=120f
> > EDX=00aef5a0 ES=015f EDI=00000000 GS=0000
> > Bytes at CS:EIP:
> > f6 45 08 10 74 11 8b 78 18 8b 44 24 30 89 38 bf
> > Stack dump:
> > 00b1981c 00b695f8 00b4b95c 00b0af60 00000000 00b14414 00000008 5df0e735
> > 00b0af60 00b55750 00aef5a8 00aef5ac 00aef5b0 00aef5a0 00000004 00b1981c
> >
> > HELP !!!!!!!
>
>
>
>
Received on Tue Apr 14 1998 - 00:00:00 CEST

Original text of this message