开发者

Number of args for stored procedure PLS-00306

开发者 https://www.devze.com 2023-01-03 10:57 出处:网络
I have problem with calling for my procedure. Oracle scrams PLS-00306 Error: Wrong number of types of arguments in call to procedure.

I have problem with calling for my procedure. Oracle scrams

PLS-00306 Error: Wrong number of types of arguments in call to procedure.

With my type decl开发者_StackOverflow社区aration procedure has exact the same declaration like in header below. If I run it as separate procedure it works, when i work in ODCI interface for extensible index creation, it throws PLS-00306.

MEMBER PROCEDURE FILL_TREE_LVL
     (target_column VARCHAR2, cur_lvl NUMBER, max_lvl NUMBER, 
     parent_rect NUMBER,start_x NUMBER, start_y NUMBER,
     end_x NUMBER, end_y NUMBER) 
IS                          
    stmt VARCHAR2(2000);
    rect_id NUMBER;
    diff_x NUMBER;
    diff_y NUMBER;
    new_start_x NUMBER;
    new_end_x NUMBER;
    i NUMBER;
    j NUMBER;
 BEGIN
{...}   
 END FILL_TREE_LVL;


 STATIC FUNCTION ODCIINDEXCREATE 
   (ia SYS.ODCIINDEXINFO, parms VARCHAR2, env SYS.ODCIEnv) RETURN NUMBER
IS  
  stmt   VARCHAR2(2000);
  stmt2 VARCHAR2(2000);
  min_x NUMBER;
  max_x NUMBER;
  min_y NUMBER;
  max_y NUMBER;
  lvl NUMBER;
  rect_id NUMBER;
  pt_tab VARCHAR2(50);
  rect_tab VARCHAR2(50);
  cnum NUMBER;
  TYPE point_rect is RECORD(
    point_id NUMBER,
    rect_id NUMBER
  );
  TYPE point_rect_tab IS TABLE OF point_rect;
  pr_table point_rect_tab;

  BEGIN

  {...}
  FILL_TREE_LVL('any string', 0, lvl,0, min_x, min_y, max_x, max_y);
  {...}

  END;


I have no experience in PL/SQL OOP, but I guess the problem occurs because you try to call a member procedure from a static function. A member procedure always needs an object context, which is lacking in the call.


Looks like you're missing a parameter, probably parent_rect I'm guessing:

FILL_TREE_LVL(target_column VARCHAR2,
              cur_lvl NUMBER,
              max_lvl NUMBER,
              parent_rect NUMBER,
              start_x NUMBER,
              start_y NUMBER,
              end_x NUMBER,
              end_y NUMBER)

FILL_TREE_LVL('any string', --target_column
              0, --cur_lvl
              lvl, --max_lvl
              min_x, --parent_rect
              min_y, --start_x
              max_x, --start_y
              max_y  --end_x
                     --end_y ???
             );
0

精彩评论

暂无评论...
验证码 换一张
取 消