logon [message #143990] |
Mon, 24 October 2005 09:55 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
Sharaf
Messages: 62 Registered: September 2005 Location: U.K
|
Member |
|
|
I am trying to create a logon table as shown below.
i created my table and form as shown below
create table login
(username varchar2(30), password varchar2(30));
insert into login values('seyi', 'password');
in the form under the when mouse click trigger
I typed in the following
declare
v_username varchar2(30);
v_password varchar2(30);
begin
select username, password
into v_username, v_password
from logon
where username = v_username;
if v_username =:logon.username and v_password =:logon.password then
go_block ('PATRON');
else
message('please enter a valid username and password');
end if;
end;
i compile the code with no errors and when i entered the username and password to logon. it show error as shown
FRM-40735: WHEN-BUTTON-PRESSED trigger raised unhandled exception ORA-01403.
Please advise.
|
|
|
|
|
Re: logon [message #144954 is a reply to message #144846] |
Sat, 29 October 2005 12:03 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
sachinjainonweb
Messages: 24 Registered: October 2005
|
Junior Member |
|
|
hi
what MHE says is absolutely correct , but still if u want to proceed with ur code do this
declare
v_username varchar2(30);
v_password varchar2(30);
begin
begin
select username, password
into v_username, v_password
from logon
where username = v_username;
exception
when others then
null;
end;
if v_username =:logon.username and v_password =:logon.password then
go_block ('PATRON');
else
message('please enter a valid username and password');
end if;
end;
Luck Always
|
|
|
Re: logon [message #144975 is a reply to message #144954] |
Sun, 30 October 2005 08:12 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
Sharaf
Messages: 62 Registered: September 2005 Location: U.K
|
Member |
|
|
I tried it but It still does not log in a valid user name and password.
It still says please entre valid username and password.
my table is below.
table logon.
username varchar2(30)
passwords varchar2(30)
i used this code as shown belown.
declare
v_username varchar2(30);
v_password varchar2(30);
begin
begin
select username, passwords
into v_username, v_password
from logon
where username = v_username;
exception
when others then
null;
end;
if v_username =:logon.username and v_password =:logon.passwords then
go_block ('PATRON1');
else
message('please enter a valid username and password');
end if;
end;
Please advice.
|
|
|
Re: logon [message #145031 is a reply to message #144975] |
Mon, 31 October 2005 08:24 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) |
sachinjainonweb
Messages: 24 Registered: October 2005
|
Junior Member |
|
|
Hi
First try to put a composite unique key on logon table
alter table logon
add unique(username,passwords)
then use forms debugger on when-button-pressed to check how ur pogram is executing .
Luck Always
|
|
|