Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

UI Loader is Forever Spinning

Jasper TanglibMay 27 2022

Hi,
In Oracle 21.2.6, I have a button that will execute this code,

DECLARE
    v_cnt NUMBER;
    v_status NUMBER;
BEGIN
    INSERT INTO IMPORT_TBL (PROJECT_ID,STATUS,ASSESSMENT_TYPE,IMPORT_TYPE,ASSESSMENT_COMMENT)
    VALUES (:P37_PROJECT_ID,'S','Auto','BP','JP submitted') RETURNING ID INTO :P37_JOB_ID;
    
    PRIV_PKG.submit_priv(:P37_JOB_ID
                        ,:P37_PROJECT_ID
                        ,:P37_ENV
                        ,:P37_USER
                        ,:P37_PASS);
    COMMIT;

    v_cnt := 0;
-- Loop until status becomes letter 'C'
    WHILE v_cnt = 0
    LOOP
        SELECT COUNT(*)
        INTO v_status
        FROM IMPORT_TBL
        WHERE type = 'Auto'
        AND status = 'C'
        AND id = :P37_JOB_ID;


    IF v_status = 1 THEN
        INSERT INTO app_tbl (app_name, app_value) VALUES('TEST', 123);

        v_cnt := v_cnt + 1;
        apex_application.g_print_success_message := 'TEST FORCE EXIT';
        EXIT;
    END IF;
    apex_application.g_print_success_message := 'TEST FORCE EXIT1';
    END LOOP;
    apex_application.g_print_success_message := 'TEST FORCE EXIT2';
END;

The code above is what gets executed while the loading spinner on the UI side continues to spin until the code finishes.
User:
The issue is, the loading spinner continues to spin forever even after the code has finished being executed as I checked the back-end side or database. I also know that it does not go into forever loop as these lines in the code are what should stop the loop, also proved this on SQL Commands.

        v_cnt := v_cnt + 1;
        apex_application.g_print_success_message := 'TEST FORCE EXIT';
        EXIT;

Is there any way to solve this issue either in the coding side or APEX's page designer side?
Any suggestions is appreciated,
Jazz

Comments

644275
First, create a workspace on the drive that you want to save the file in and then try saving you file using File -> Save As and then select that workspace.
IHodgetts
Something else you might find useful is to have a shared (mapped) drive to store scripts centrally. See the post below:

882392
682072
thanks.....this information is useful
679279
hi

you can store the scripts in one of the workspace available in OATS.
you wont get a chance to create the work space in other drive then in which OATS is installed.

but if you need to make a back up of scripts then simply copy and paste it wherever you want them,and whenever you need to run the script then copy it and paste to one of the workspace of OATS.

hope will help you

regards
Umesh

Edited by: USoni on May 15, 2009 3:41 AM
1 - 4

Post Details

Added on May 27 2022
7 comments
747 views