Results 1 to 4 of 4

Thread: Question in Oracle

  1. #1
    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;

  2. #2
    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

  3. #3
    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.

  4. #4
    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;

Similar Threads

  1. Replies: 8
    Last Post: 27-01-2012, 01:14 PM
  2. Hit ratio in oracle
    By Aileen_L in forum Software Development
    Replies: 5
    Last Post: 13-02-2010, 04:37 PM
  3. Is Oracle Ok?
    By willactnow in forum Education Career and Job Discussions
    Replies: 2
    Last Post: 15-09-2009, 02:06 PM
  4. Oracle optimization HELP!!!
    By spectre in forum Tips & Tweaks
    Replies: 1
    Last Post: 21-06-2008, 04:13 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,713,940,928.40656 seconds with 16 queries