Home » Developer & Programmer » Forms » UsterSa (oracle forms 10g)
UsterSa [message #663033] Fri, 19 May 2017 01:38 Go to next message
UsterSa
Messages: 8
Registered: November 2016
Junior Member
hello guys,
you advice will be highly appreciated.

please help.

I have two forms here, form1 as parent and form2 as child.
in form1 i validate user's card via card reader in a function. it user's card is corect. I call form2(only that card is ok)to validated the password that is stored in a db, then i have the select statement to get the password and validate it on the second form.
if the password is not correct i inform the user to input correct password however if the user press escpate on the keyboard, key code continues exceutes all the statements after, the statment that call_form(form1.........)in parent form(form1). I have stoped the user not to escape and use the cancel button.

question
is there away that can rollback/termanite/ stop the whole process in form1 if the user press cancel also in form2. currelty if you press cancel its doing the same thing it was doing when you press ESC

thank you.
Re: UsterSa [message #663034 is a reply to message #663033] Fri, 19 May 2017 01:56 Go to previous messageGo to next message
Littlefoot
Messages: 21806
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Why do you use 2 forms? Can't you do that in one form? Card validation = username; password = ... well, password. Why 2 forms?

Anyway: you could use a global variable, for example:
-- in form 2
if password is incorrect then
   :global.cb_pw_ok := 0;
else
   :global.cb_pw_ok := 1;
end if;
-- in form 1
call (form 2);

-- once you return from form 2
if :global.cb_pw_ok = 0 then
   message (you can't continue because of a wrong password)
end if;
Re: UsterSa [message #663038 is a reply to message #663034] Fri, 19 May 2017 04:37 Go to previous message
UsterSa
Messages: 8
Registered: November 2016
Junior Member
Thank you Littlefoot, for you positive response.

I 'm not the developed both forms, i found then like that. I proposed the used of one form and it was rejected and reason for that were given. I am forced to find a solution the way the client wants. I will apply what you said and advise later.

thnak you.
Previous Topic: Report Assignment on a button in Oracle Forms 6i
Next Topic: How to avoid message: FRM-40505
Goto Forum:
  


Current Time: Thu Mar 28 11:00:48 CDT 2024