8 Replies Latest reply: Jun 30, 2014 1:16 AM by c7bacc7c-0666-4c51-9997-4090df9a92f2 RSS

    How to get details after student Login

    c7bacc7c-0666-4c51-9997-4090df9a92f2

      I am using Oracle apex can anyone help me where i am developing school management system...I created users but after login in to the form i am unable to get the user details can u please help me......

        • 1. Re: How to get details after student Login
          Sunil Bhatia

          Hi,

           

          Insufficient information.

           

          Can you please tell:

          1. What is the syntax of tables and how user and details are mapped.

          2. Provide code of authentication scheme to login.

          3. Also provide the code you are writing to retrieve user details.

           

          Thanks

          Sunil Bhatia

          • 2. Re: How to get details after student Login
            c7bacc7c-0666-4c51-9997-4090df9a92f2

            Hi Sunil Bhatla

                  Thanks for replay....My table name person details and my login  table name is per_login

            1.My authentication scheme login code is...

             

            CREATE OR REPLACE FUNCTION

            VALIDATE_USER_FROM_DB(P_USERNAME IN VARCHAR2,P_PASSWORD IN VARCHAR2)

            RETURN BOOLEAN AS

            V_PW_CHECK VARCHAR2(1);

            BEGIN

            SELECT 'X' INTO V_PW_CHECK

            FROM PER_LOGIN

            WHERE UPPER (USER_NAME)=UPPER(P_USERNAME)

            AND

            USER_PASSWORD=P_PASSWORD;

            APEX_UTIL.SET_AUTHENTICATION_RESULT(0);

            RETURN TRUE;

            THEN

            APEX_UTIL.SET_AUTHENTICATION_RESULT(4);

            RETURN FALSE;

            END VALIDATE_USER_FROM_DB;

             

            This is work......

            But my problem when person login  showing the details of login person

            example: gmail,facebook when login into the gmail or facebook your details will come automaticly

            2.How to getting the login person information

             

             

             

            Thanks

            GopiKrishna

            • 3. Re: How to get details after student Login
              Sunil Bhatia

              Ok,

               

              So now when you have login into page. Create a region and create few items on page: for example:

               

              P1_EMAIL

              P1_FIRSTNAME

              P1_LASTNAME

               

              Create a process, on load, such as:

               

              select email, firstname, lastname into :P1_EMAIL, :P1_FIRSTNAME, :P1_LASTNAME from per_login when upper(USER_NAME) = :APP_USER;
              
              

               

              -- This will work, let me know you wish something else.

               

              -- Sunil Bhatia

              • 4. Re: How to get details after student Login
                c7bacc7c-0666-4c51-9997-4090df9a92f2

                Thanks For Replay

                         But I Am already doing same way but not getting details......Another way is there ...?

                SQL code

                1. select email, firstname, lastname into :P1_EMAIL, :P1_FIRSTNAME, :P1_LASTNAME from per_login when upper(USER_NAME) = :APP_USER; 

                when creating process

                Sql expression error getting

                1 error has occurred

                • Failed to parse SQL query! ORA-00936: missing expression
                • 5. Re: How to get details after student Login
                  Sunil Bhatia

                  Hi,

                   

                  Why are you giving condition type as SQL Expression?

                   

                  What are you writing inside that condition type box? You dont need to give anything in that. You just have to create PL SQL onload process without any condition type.

                   

                  Have you read 2 day application developer guide before starting with apex. I recommend you to read it before starting with apex.

                  Contents

                   

                  -- Sunil Bhatia

                  • 6. Re: How to get details after student Login
                    jwellsnh

                    c7bacc7c-0666-4c51-9997-4090df9a92f2 wrote:

                     

                    Thanks For Replay

                             But I Am already doing same way but not getting details......Another way is there ...?

                    SQL code

                    1. select email, firstname, lastname into :P1_EMAIL, :P1_FIRSTNAME, :P1_LASTNAME from per_login when upper(USER_NAME) = :APP_USER; 

                    when creating process

                    Sql expression error getting

                    1 error has occurred

                    • Failed to parse SQL query! ORA-00936: missing expression

                    This code above has a typo, change WHEN to WHERE and the parsing error should go away.

                     

                    Jeff

                    • 7. Re: How to get details after student Login
                      c7bacc7c-0666-4c51-9997-4090df9a92f2

                      Thanks for replay

                                   I am creating a PL/SQL process Before Header PL/SQL process code:

                      DECLARE

                      V_FULLNAME VARCHAR2(20);

                      V_EMAILID VARCHAR2(20);

                      V_MOBILE NUMBER(20);

                      V_DOB DATE;

                      BEGIN

                      SELECT FULLNAME,EMAILID,MOBILE,DOB into V_EMAILID,V_FULLNAME, V_MOBILE,V_DOB from PER_DETAILS WHERE upper(USER_NAME) = :APP_USER;

                      DBMS_OUTPUT.PUT_LINE(V_FULLNAME || V_EMAILID || V_MOBILE);

                      END;

                       

                       

                       

                      BUT OUT PUT NOT COMING PLEASE HELP......

                       

                       

                      THANKS

                      GOPIKRISHNA


                      • 8. Re: How to get details after student Login
                        c7bacc7c-0666-4c51-9997-4090df9a92f2

                        SELECT BASIC*0.02 VP,BASIC*0.03 ESI,BASIC*0.05 IT,BASIC*0.0004 PT,BASIC*0.04 TA,BASIC*0.02 DA,BASIC*0.02 HRA,BONUS,BASIC*0.01 INSEN,BASIC*0.001 COMM,

                        BASIC*0.02+BASIC*0.03+BASIC*0.05+BASIC*0.0004 DEDUCTIONS,BASIC*0.04+BASIC*0.02+BASIC*0.02+BONUS+BASIC*0.01+BASIC*0.001 EARNINGS,BASIC+(BASIC*0.04+BASIC*0.02+BASIC*0.02+BONUS+BASIC*0.01+BASIC*0.001)-(BASIC*0.02+BASIC*0.03+BASIC*0.05+BASIC*0.0004) NETSALARY INTO :P3_VP,:P3_ESI,:P3_IT,:P3_PT,:P3_TA,:P3_DA,:P3_HRA,:P3_BONUS,:P3_INCENTIVES,:P3_COMMISSION,:P3_TOTAL_DEDUCTIONS,:P3_TOTAL_EARNINGS,:P3_NET_SALARY

                        FROM SALARY WHERE USER_NAME=:APP_USER;

                        THIS IS WORKING.....