Skip to Main Content

Oracle Forms

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

login and change message location

TasneemApr 3 2012 — edited Apr 9 2012
Hi all,
I want to display an error msg when the user enters user name or pwd incorrect, and would like to change the location of the error msg on the screen , here is the code::


declare
cursor c1 is select user_name, user_password from Users;
c1_user_name Users.user_name%type;
c1_user_password Users.user_password%type;

begin
:global.count:=0;
open c1;
first_record;
loop
fetch c1 into c1_user_name,c1_user_password;
exit when c1%notfound;

if :user_name= c1_user_name and :user_password= c1_user_password then

new_form('MAIN_MENU.fmx');

else

begin

message('the user name or password is incorrect');
message('the user name or password is incorrect');
:global.count := nvl(:global.count,0)+1; --counting # of login trials


end;


end if;


if :global.count =3 then
begin
clear_block ('USERS.fmx');
exit_form(NO_COMMIT,NO_VALIDATE);
end;
end if;


end loop;

close c1;

end;


1) Is it correct?? because it doesn't close the form when count reaches 3
2) how to change the location of the msg because it is not displayed completely???

Thank u,
Tasneem
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 7 2012
Added on Apr 3 2012
23 comments
253 views