3 Replies Latest reply on Oct 9, 2018 1:22 PM by thatJeffSmith-Oracle

    Package Variables and Sys_context not working

    VikasSh

      Hi,

       

      Did any one work with pkacage variable and sys_context  in Rest Handler?

       

      My Rest handler type was pl/sql block followinf the sudo code i used and noticed that package variable and sys_context does not work.

       

      BEGIN

      -- First procedure

           mypackage.initialize(p_id    => :id)  -->> this will create the sys_context like (my_ctx, 'user_location','NY')

       

         myNewpackage.myProc(p1 => sys_context(my_ctx,'user_location'))     -->> here i get null value in sys_context

       

      --- Then i changed initialized procedure and set a package variable ( myPkg.var_loc := 'NY')

       

         myNewpackage.myProc(p1 = >  myPkg.var_loc)  -->>this does not work when i check ORDS log it says Invalid identifier "myPkg.var_loc"

       

       

      END; 

       

      Can someone guide me what wrong i am doing? I check my logic and code on sqlplus it works fine on sql plus but not on REST handler.