#1
| |||
| |||
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( ![]() 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= ![]() 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; |
#2
| |||
| |||
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 |
#3
| |||
| |||
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 |
#4
| |||
| |||
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( ![]() 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= ![]() 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; |
![]() |
|
Tags: oracle |
Thread Tools | Search this Thread |
|
![]() | ||||
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 |