Showing posts with label Forms. Show all posts
Showing posts with label Forms. Show all posts

Wednesday, 26 June 2013

Login Page Creation in Oracle Form 10g

Login Page Creation in Oracle Form 10g


create table gmail(name varchar2(20) constraint pk_name primary key,pswd varchar2(20)not null)

select * from gmail


create form>> using form builder>>


Get user name and password as input>>Create one  push button>>

Query for Login button>>

DECLARE
    CURSOR login_cursor IS
      SELECT NAME,
             pswd
      FROM   GMAIL;
    NAME_var GMAIL.NAME%TYPE;
    pswd_var  GMAIL.pswd%TYPE;
    login_flag  BOOLEAN := FALSE;
BEGIN
    OPEN login_cursor;

    <<check_records>>
    LOOP
        FETCH login_cursor INTO NAME_var, pswd_var;

        IF( :user_NAME = NAME_var
            AND :PASSWORD = pswd_var ) THEN
          --Message('You are successfully loged In');
         -- GO_BLOCK('BLOCK8.CANVAS147');
         Message('You are successfully loged In',acknowledge);
        
       -----  go_item('BLOCK8.t1');
        --show_view('CANVAS147');
        
       Message('Message Ater :Logged In',acknowledge);      
                      login_flag := TRUE;

          exit check_records;
        END IF;

        EXIT WHEN login_cursor%NOTFOUND;
    END LOOP;

    CLOSE login_cursor;

    IF( NOT login_flag ) THEN
      Message('INVALID LOGIN');
    END IF;

    clear_form;
END;
go_item('BLOCK8.t1'); 











 Click login button>>


 Login successfull.