2 Replies Latest reply: Dec 22, 2013 10:50 PM by Priyasagi RSS

    Connecting Two Different Database

    Moazam Shareef

      Guys,

       

      I have the below code for login form which is working fine.

      IF:LOGIN.USERNAME IS NULL THEN
      BELL;
      ALERT_MESSAGES('Username cannot be null, Please enter USERNAME');
      GO_ITEM('LOGIN.USERNAME');
      RAISE FORM_TRIGGER_FAILURE;
      ELSIF
      :LOGIN.PASSWORD IS NULL THEN
      BELL;
      ALERT_MESSAGES('Password cannot be null, Please enter PASSWORD');
      GO_ITEM('LOGIN.PASSWORD');
      RAISE FORM_TRIGGER_FAILURE;
      END IF;
        SELECT 1

        INTO vVar1

        FROM MN_USER_PROFILE

        WHERE LOGIN_NAME = :LOGIN.USERNAME 

        AND LOGIN_PASSWORD = :LOGIN.PASSWORD;

        --AND COMPANY = :LOGIN.LOGON_LST;    

              :GLOBAL.USER_NAME1:=:LOGIN.USERNAME;

              --:GLOBAL.COMPANY:=:LOGIN.LOGON_LST;

              NEW_FORM('CAN_TOOL');

      EXCEPTION

        WHEN OTHERS THEN

          ALERT_MESSAGES('Invalid Username/Password, Please re-enter.');

          RAISE FORM_TRIGGER_FAILURE;

      END;

       

      now i add another list item where i add compnies as below.

      Company-1

      Company-2

      Company-3

       

      all the resources are same in application except the database users, all the users are in single oracle server with different company users. company-1 have company-1/company-1@orcl user,  company-2 have company-2/company-2@orcl user and so on....

      on login form i add one list item called 'COMPANY' where the above company list appear during runtime.

       

      after entering username and password, if user select  company-1 this will have to connect company-1/company-1@orcl and proceed with application, how can i configure the company-2 and company-3 in the above code and how to configure formsweb configuation file for the above companies?

       

      Regards