SqlDbx Forum

SqlDbx

You are not logged in.

#1 2012-07-17 12:38:26

garbuya
Member

Why right click menu on package is different?

OK, this is a scenario: Oracle 11G, development region

I clicked on + next to the package name and expanded it to display all procedures and functions

When I do a right click on one procedure from this list the selection of options is different:

Sometimes it could be only options "Script Execute" or "Execute" when you right click on any procedure

Sometimes if you right click on the 1st procedure, the only choice you would have is "Script Execute" or "Execute"
When you click on the 2nd procedure the options are "Script Create", "Edit procedure", "Script Execute" and "Execute"
When you click on 3rd, 4th, etc. the choice is still only "Script Execute" or "Execute"

Why 2nd from the top procedure or function sometimes is so special?

And, by the way, if you click this extra available option "Edit procedure" it opens a corrupted code only for this procedure (some lines of code and some input parameters are deleted) and offers  to create a brand new stand alone procedure! 

This is a very srange behaviour!

======================
this is a simplified code of a package with extra options created by "Edit package" option, so all literals remains as is

create or replace package                                    cas_util_pkg as
   type refcursortype is ref cursor;
   function fn_batch_job_is_active return varchar2;
   function fn_rbt_batch_job_is_active return varchar2;
   function fn_validate_product_nbr( p_prod_nbr in  varchar2,p_cntl_locn in  varchar2) return varchar2;
   procedure cas_batch_job_is_active( error_msg out  varchar2,is_batch_active out  varchar2);
   procedure "cas_vldcd_list_sel" (vldcdcursor out cas_util_pkg.refcursortype,fieldname in varchar2,sortcolumn in varchar2);
end cas_util_pkg;
/
create or replace package body                                                   cas_util_pkg as
function fn_validate_product_nbr( p_prod_nbr in  varchar2,p_cntl_locn in  varchar2) return varchar2 is
  v_prod_nbr_tmp varchar2(50);
  begin
  v_prod_nbr_tmp := trim(p_prod_nbr);
  return v_prod_nbr_tmp;
  exception when others then
    raise;
  end fn_validate_product_nbr;

function fn_batch_job_is_active return varchar2 is
  batch_job_active varchar2(50);
  begin
     return 'true';
  exception when others then
     return 'false';
end fn_batch_job_is_active;

function fn_rbt_batch_job_is_active return varchar2 is
  batch_job_active varchar2(50);
  begin
     return 'true';
  exception when others then
     return 'false';
end fn_rbt_batch_job_is_active;

procedure cas_batch_job_is_active( error_msg out varchar2,is_batch_active out varchar2) as
  begin
     is_batch_active := fn_batch_job_is_active();
  exception when others then
    is_batch_active := 'false';
end cas_batch_job_is_active;

procedure "cas_vldcd_list_sel" (vldcdcursor out cas_util_pkg.refcursortype,fieldname in varchar2,sortcolumn in varchar2) is
    sql_query  varchar2(2000);
    l_sortcolumn varchar2(100);
  begin
    l_sortcolumn := trim(sortcolumn);
    if l_sortcolumn is null or l_sortcolumn = '' then
       l_sortcolumn := 'default_value_one, vldtn_long_desc';
    end if;
     sql_query  := select sysdate from dual';
     open vldcdcursor  for sql_query  ;
    exception
    when others then
        raise;
end "cas_vldcd_list_sel";
end cas_util_pkg;
/

Last edited by garbuya (2012-07-17 13:02:56)

Offline

#2 2012-07-17 20:43:31

sqldbxhelp
Administrator

Re: Why right click menu on package is different?

I am not able to reproduce this behavior.
Only right click menu options for package procedures and functions should "Scrip Execute" and "Execute..."

Offline

Board footer

Powered by FluxBB