Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Tags Active Topics RSS Search Mark Forums Read

Reply
 
Thread Tools Search this Thread
  #1  
Old 02-06-2009
Member
 
Join Date: May 2009
Posts: 15
Question in Oracle

I do a Login form that take username & password then it check the type of the user ( Manager or Employee ), by that it open a special form for each type.

When I checked the code it is right but it dose not work ! It dose not take me to any where !

Also I had but a button with a trigger for calling new form but it also don?t open the form !!

Could you help me ??

declare
emp_no employee.ecpr%type;
emp_name employee.name%type;
emp_type employee.type%type;
begin
if NVL(LENGTH( :USERNAME ),0)=0 or NVL(LENGTH( ASS_WORD ),0)=0 then
message('please, enter the username and password first');
end if;

select ecpr, name, type into emp_no, emp_name, emp_type from employee
where employee.username=:USERNAME AND employee.password=ASS_WORD;

if emp_type = 'M' then
call_form('C:\Documents and Settings\ALAWIBH\Desktop\Second 2007\ITCS395\Project\MODULE2.fmx');

else
call_form('C:\Documents and Settings\ALAWIBH\Desktop\Second 2007\ITCS395\Project\MODULE2.fmx');

end if;

exception
when NO_DATA_FOUND then
message('Wrong Username OR Password');
end;


CALL TRIGGER:

//When image pressed

begin
call_form('D:\somtting3ty\uob2009\CS395\project\formy\employee.fmx');
exit_form;
end;
Reply With Quote
  #2  
Old 03-06-2009
Member
 
Join Date: Mar 2008
Posts: 227
Re: Question in Oracle

Hi CS,
I suppose here you have not mentioned the button pressed function, provide the button press function here,and the all the declaration you have made, that you have enabled on the front end or in your database.and which language you have used for your front end application to back end? Please provide these details if possible this will help us to understand more about your problem.

Regard
Reply With Quote
  #3  
Old 03-06-2009
Member
 
Join Date: Jan 2009
Posts: 40
Re: Question in Oracle

Hey I got what exactly is your problem here but donno about Oracle.
But still i would like to give you an idea for the login form so you can develop some code for oracle.
Use a nested If else condition. (Do you want to validate the username & password from database?)
Code:
If strUsername = "admin" Or strUsername = "xyz" Or strUsername = "A" etc... then
Response.Redirect("form1.asp")
ElseIf strUsername = "D" Or strUsername = "E" etc... Then
Response.Redirect("form2.asp")
Else
Response.Redirect("Login.asp")
End If
Well you can define 2 variables & check the condition too for login.
Reply With Quote
  #4  
Old 05-06-2009
Member
 
Join Date: May 2009
Posts: 15
Re: Question in Oracle

i had done it with this code:

declare
emp_no employee.ecpr%type;
emp_name employee.ename%type;
emp_type employee.etype%type;
begin
if NVL(LENGTH( :USER_NAME ),0)=0 or NVL(LENGTH( ASS_WORD ),0)=0 then
message('please, enter the username and password first');
end if;

select ecpr, ename, etype into emp_no, emp_name, emp_type from employee
where employee.user_name=:USER_NAME AND employee.pass_word=ASS_WORD;

if emp_type = 'M' then
call_form('D:\somtting3ty\uob2009\CS395\project\formy\manager.fmx');

else
call_form('D:\somtting3ty\uob2009\CS395\project\formy\employee.fmx');

end if;

exception
when NO_DATA_FOUND then
message('Wrong Username OR Password');
end;
Reply With Quote
Reply

  TechArena Community > Software > Software Development
Tags:



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "Question in Oracle"
Thread Thread Starter Forum Replies Last Post
Question about SanDisk sansa Clip Zip playlists question VARIJ Portable Devices 8 27-01-2012 01:14 PM
Hit ratio in oracle Aileen_L Software Development 5 13-02-2010 04:37 PM
Is Oracle Ok? willactnow Education Career and Job Discussions 2 15-09-2009 02:06 PM
Oracle optimization HELP!!! spectre Tips & Tweaks 1 21-06-2008 04:13 PM


All times are GMT +5.5. The time now is 04:07 PM.