2 Replies Latest reply: Oct 23, 2013 8:27 AM by Mikemul305-Oracle RSS

    Apex calling stored procedures causing unexpected results.

    Mikemul305-Oracle

      Hi Experts,

       

      I was trying to learn the process of calling a procedure via a url and was following the steps found in this blog posting >  daust_de :: Oracle XE / APEX: XE: Calling stored procedures. 

       

      I was trying to apply the steps to my local Apex 4.2 version.  Unfortunately I could not get things to work.  So when I attempted to drop the function that was created with the above posting, I'm still unable to resolve my original local apex url that was working fine before attempting the steps in blog posting.  Any tips on how I can get my local Apex copy working again would be very much appreciated.  Thanks!  -Mike

       

      Steps:

      1) Created Function:

      {code}

      CREATE OR REPLACE function wwv_flow_epg_include_mod_local(HELLO_WORLD in varchar2)

      return boolean

      is

      begin

          if upper(HELLO_WORLD) in (

                'APEX_040200.HELLO_WORLD') then

              return TRUE;

          else

              return FALSE;

          end if;

      end wwv_flow_epg_include_mod_local;

      {code}

      2a) Drop function wwv_flow_epg_include_mod_loca

      2) Apex url:  http://localhost:8080/apex/f?p=4000:4150:5524229756293::NO:::

      3) Error: 

      Not found

      The requested URL /apex/f was not found on this server

        • 1. Re: Apex calling stored procedures causing unexpected results.
          jariola

          Hi,

           

          Try compile function again as follow

          CREATE OR REPLACE FUNCTION
          apex_040200.wwv_flow_epg_include_mod_local(
            PROCEDURE_NAME IN VARCHAR2)
          RETURN BOOLEAN
          IS 
          BEGIN 
          
            --RETURN FALSE; -- remove this statement when you add procedure names to the "IN" list
            RETURN TRUE;
          
            IF UPPER(procedure_name) IN ('')
            THEN 
              RETURN TRUE; 
            ELSE 
              RETURN FALSE; 
            END IF;
          
          END wwv_flow_epg_include_mod_local;
          /
          

           

          This should allow any procedure call from URL.

           

          If you get things working whit this, then we can modify and make function more restrictive.

           

          Regards,
          Jari

          • 2. Re: Apex calling stored procedures causing unexpected results.
            Mikemul305-Oracle

            Hi Jari.

             

            Thanks for the reply and suggestion.  Unfortunately, I couldn't things to work even after trying your suggestion (I'm sure it's something I'm doing wrong.)

             

            Is there anyway to easily rollback the changes so that things can work as they did before implementing / creating the Function?  Meaning this URL resolved fine locally before creating the function (http://localhost:8080/apex/f?p=4000:4150:5524229756293::NO:::)  , however now it generates an error (see my initial posting for error details).

             

            Thanks again for the help on this!

            Mike