Using APEX_APPLICATION_TEMP_FILES in the DB package

Hi all

I have a problem using the new view of Apex APEX_APPLICATION_TEMP_FILES inside the database.

My procedure will always return no results, using the old vision-WWV_FLOW_FILES Apex 4.2 a similar procedure has functioned well.

When you set the environment of the apex, selects the apex findings normally worked...

Someone at - it an idea?

Here is my code:

  PROCEDURE get_apex_temp_blob(i_item_value IN VARCHAR2,
                              o_blob      OUT BLOB) IS
    --
    l_workspace_id NUMBER;
    l_app_id      NUMBER;
    --
    CURSOR l_cur_apex_blob IS
      SELECT atf.blob_content
        FROM apex_application_temp_files atf
      WHERE atf.application_id = l_app_id
        AND atf.name = i_item_value
      ORDER BY atf.id DESC;
    --
  BEGIN
    --
    l_app_id := v('APP_ID');
    --
    -- Set Apex Workspace ID and Security Group ID
    SELECT MAX(workspace_id)
      INTO l_workspace_id
      FROM apex_applications
    WHERE apex_applications.application_id = l_app_id;
    --
    apex_util.set_security_group_id(p_security_group_id => l_workspace_id);
    --
    -- Open cursor and fill blob
    OPEN l_cur_apex_blob;
    FETCH l_cur_apex_blob
      INTO o_blob;
    CLOSE l_cur_apex_blob;
    --
  END get_apex_temp_blob;

Like i_item_value I spend for example v ('P1_UPLOAD_ITEM')

Thank you or help!

-Daniel

Sometimes the solution can be simple. ^ ^

In my cursor, I updated my app APP_ID application_id, but apex_application_temp_files application_id column is always 0. If this change to this value, the select returns my downloaded BLOB content.

Strange logic, why the value 0 application_id is not the real APP_ID, maybe a bug?

-Daniel

Tags: Database

Similar Questions

Maybe you are looking for

  • What to do when the administrator of the computer is missing

    turn on the computer of the computer administrator when sign is missing and the portion of comments don't leave me in the only required information

  • Startup Repair offline, startup guard

    This has happened so many times, got my computer, bought separate parts (custom-made, over £1200) installed windows, everything has worked well until about a month. He projected blue and then my hard drive could not be found, kept saying (the disk na

  • Watch why go to sleep?

    Yesterday, my PC worked perfectly. But this morning when I pushed the power button, power light turned on normally and there was a normal voice of the case but a few seconds after the PC gave this error on the screen: "Monitor going to sleep" and PC

  • Replace disk in a RAID 6 array

    Hello I have a PE T610 with controller raid H700, 2 drives in RAID-1, and 6 disks in RAID-6 table. One of the disks in RAID-6 is display of media and other errors. The reader is still online but I have problems with it and want to replace it. Device

  • Printing with the Photosmart 5514 problem!

    I have a Photosmart 5514 and have just started using it and I probably did something wrong as a beginner and I need help to solve the problem.How can I remove printing pending to be executed? I don't know why there is a print job in the queue and whe