| error capture [message #399267] |
Tue, 21 April 2009 06:33  |
varosh81
Messages: 178 Registered: February 2008 Location: CHENNAI
|
Senior Member |
|
|
Hi to all
I have created a login form.I enter the correct username and password ,then click the pushbutton it goes to next block.It works fine.I enter wrong username ,password doesnt go the next block.It works fine.There is a default error message dispaly like
FRM-40735:WHEN_BUTTON_PRESSED trigger raised unhandled exception ORA-01403
I write the following code
begin
begin
select username,password into :block8.username,:block8.password from pim_log2
where username =:block8.username and password=:block8.password ;
if :block8.username =:block8.username and :block8.password=:block8.password then
go_block('pim_emplpersonalinfo');
else
message('Invalid username and password');
end if;
end;
else part doesnot display.alternatively first mentioned default error message display.my question is enter the wrong username and password else part display
Send solution
thanks regards
varosh
[Updated on: Tue, 21 April 2009 06:37] Report message to a moderator
|
|
|
|
| Re: error capture [message #399277 is a reply to message #399267] |
Tue, 21 April 2009 06:56  |
 |
Littlefoot
Messages: 21826 Registered: June 2005 Location: Croatia, Europe
|
Senior Member Account Moderator |
|
|
NO-DATA-FOUND can not be captured in an IF-THEN-ELSE - you'll need to write an exception handling section to do that, such asbegin
select ...
from ...
where ...
if ... then
...
else
...
end if;
exception
when no_data_found then
...
end;
|
|
|
|