I created a login screen to over-write the oracle default login screen.
This works fine.
This is where I am having problem:
The way the application works now is that once the user logs in, he/she will manually enter his internal emp_id which is numeric and then that emp_id populates his/her emp_name.
The way the client wants it now is once the user logs in, his/her emp_id automatically populates the emp_id and emp_name text boxes.
I am having problem with this.
The only way to make it work is by hard coding the employee Id which is bad.
hint: login_username and password are of varchar2 type
while emp_id is of number type.
Can anyone please help?
Here is the current code I am using:
declare
vnum number(6);
vname varchar2(25);
begin
select emp_id,
emp_name
into vnum, vname
from emp
where emp_id = 6;
:emp.emp_id := vnum;
:emp.empname := vname;
end;
I will like to say select emp_id, emp_name
into :emp_id, :emp_name
where user_name = inputted_username from login screen
and password = password from login screenn.
This way, pasword will be a pointer to emp_id.
This is hard but I am sure someone has done it before.
Please help!
This works fine.
This is where I am having problem:
The way the application works now is that once the user logs in, he/she will manually enter his internal emp_id which is numeric and then that emp_id populates his/her emp_name.
The way the client wants it now is once the user logs in, his/her emp_id automatically populates the emp_id and emp_name text boxes.
I am having problem with this.
The only way to make it work is by hard coding the employee Id which is bad.
hint: login_username and password are of varchar2 type
while emp_id is of number type.
Can anyone please help?
Here is the current code I am using:
declare
vnum number(6);
vname varchar2(25);
begin
select emp_id,
emp_name
into vnum, vname
from emp
where emp_id = 6;
:emp.emp_id := vnum;
:emp.empname := vname;
end;
I will like to say select emp_id, emp_name
into :emp_id, :emp_name
where user_name = inputted_username from login screen
and password = password from login screenn.
This way, pasword will be a pointer to emp_id.
This is hard but I am sure someone has done it before.
Please help!