• <bdo id='njOMo'></bdo><ul id='njOMo'></ul>

        <small id='njOMo'></small><noframes id='njOMo'>

      1. <legend id='njOMo'><style id='njOMo'><dir id='njOMo'><q id='njOMo'></q></dir></style></legend>
      2. <i id='njOMo'><tr id='njOMo'><dt id='njOMo'><q id='njOMo'><span id='njOMo'><b id='njOMo'><form id='njOMo'><ins id='njOMo'></ins><ul id='njOMo'></ul><sub id='njOMo'></sub></form><legend id='njOMo'></legend><bdo id='njOMo'><pre id='njOMo'><center id='njOMo'></center></pre></bdo></b><th id='njOMo'></th></span></q></dt></tr></i><div id='njOMo'><tfoot id='njOMo'></tfoot><dl id='njOMo'><fieldset id='njOMo'></fieldset></dl></div>

      3. <tfoot id='njOMo'></tfoot>

        PL/SQL:错误“PLS-00306:调用中的参数数量或类型错误"为数字表触发

        PL/SQL: Error quot;PLS-00306: wrong number or types of arguments in call toquot; triggered for table of numbers(PL/SQL:错误“PLS-00306:调用中的参数数量或类型错误为数字表触发)
        <i id='C0GST'><tr id='C0GST'><dt id='C0GST'><q id='C0GST'><span id='C0GST'><b id='C0GST'><form id='C0GST'><ins id='C0GST'></ins><ul id='C0GST'></ul><sub id='C0GST'></sub></form><legend id='C0GST'></legend><bdo id='C0GST'><pre id='C0GST'><center id='C0GST'></center></pre></bdo></b><th id='C0GST'></th></span></q></dt></tr></i><div id='C0GST'><tfoot id='C0GST'></tfoot><dl id='C0GST'><fieldset id='C0GST'></fieldset></dl></div>
        <legend id='C0GST'><style id='C0GST'><dir id='C0GST'><q id='C0GST'></q></dir></style></legend>
          <tbody id='C0GST'></tbody>

      4. <tfoot id='C0GST'></tfoot>

            <bdo id='C0GST'></bdo><ul id='C0GST'></ul>
                • <small id='C0GST'></small><noframes id='C0GST'>

                  本文介绍了PL/SQL:错误“PLS-00306:调用中的参数数量或类型错误"为数字表触发的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我正在尝试使用确切的过程签名调用 API,但不知何故,我认为数字表无法正确识别.

                  I'm trying to call an API using the exact procedure signature, but somehow the table of numbers I don't think is recognize correctly.

                  API 定义:

                  TYPE NUMLIST IS TABLE OF NUMBER INDEX BY VARCHAR2(50);
                  
                  PROCEDURE GETSERVICES_API
                  (
                     I_DIMOBJID IN NUMBER, I_OBJECTID IN NUMBER, I_FILTER IN NUMBER, 
                     O_ERRORCODE OUT NUMBER, O_ERRORTEXT OUT VARCHAR2, O_SERVICELIST OUT NUMLIST
                  );
                  

                  我对 API 的调用:

                  My call of API:

                  DECLARE
                  
                     TYPE NUMLIST IS TABLE OF NUMBER INDEX BY VARCHAR2(50);
                     lt_SERVICELIST              NUMLIST;
                  
                     ls_errortext             varchar2(100);
                     ln_errorcode             number;
                  
                  BEGIN
                  
                  
                      PKGCOMSUPPORT_SERVICE.GETSERVICES_API(I_DIMOBJID => 6,
                                                            I_OBJECTID => 5263,
                                                            I_FILTER => 3,
                                                            O_ERRORCODE => ln_errorcode,
                                                            O_ERRORTEXT => ls_errortext,
                                                            O_SERVICELIST => lt_SERVICELIST);
                  
                  END;
                  

                  当我运行 API 调用时,我得到:PLS-00306:调用GETSERVICE_API"时参数类型的数量错误

                  When I run my call of API I got: PLS-00306: wrong number of types of arguments in call to 'GETSERVICE_API

                  知道为什么吗?谢谢

                  推荐答案

                  您面临 PLS-00306 错误的原因是 NUMLIST 集合类型不兼容,已定义在匿名 PL/SQL 块中定义的包规范和 NUMLIST 集合类型中.尽管这两种集合类型的定义相同,但它们并不兼容.在您的匿名 PL/SQL 块中,您必须声明一个 PKGCOMSUPPORT_SERVICE.NUMLIST 数据类型的变量,然后将其传递给 GETSERVICES_API 过程.

                  The reason why you are facing the PLS-00306 error is incompatibility of NUMLIST collection type, defined in the package specification and NUMLIST collection type defined in the anonymous PL/SQL block. Even though definitions of those two collection types are the same, they are not compatible. In your anonymous PL/SQL block you have to declare and then pass into the GETSERVICES_API procedure a variable of PKGCOMSUPPORT_SERVICE.NUMLIST data type.

                  create or replace package PKG as
                    type t_numlist is table of number index by varchar2(50);
                    procedure SomeProc(p_var in pkg.t_numlist);
                  end;
                  /
                  
                  create or replace package body PKG as
                    procedure someproc(p_var in pkg.t_numlist) is
                    begin
                      null;
                    end;
                  end;
                  /
                  
                  declare
                    type t_numlist is table of number index by varchar2(50);
                    l_var t_numlist;
                  begin
                    pkg.someproc(l_var);
                  end;
                  
                  ORA-06550: line 5, column 3:
                  PLS-00306: wrong number or types of arguments in call to 'SOMEPROC'
                  
                  declare
                    --type t_numlist is table of number index by varchar2(50);
                    l_var pkg.t_numlist;
                  begin
                    pkg.someproc(l_var);
                  end;
                  
                  anonymous block completed
                  

                  这篇关于PL/SQL:错误“PLS-00306:调用中的参数数量或类型错误"为数字表触发的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  How to redirect the output of DBMS_OUTPUT.PUT_LINE to a file?(如何将 DBMS_OUTPUT.PUT_LINE 的输出重定向到文件?)
                  How do I get column datatype in Oracle with PL-SQL with low privileges?(如何使用低权限的 PL-SQL 在 Oracle 中获取列数据类型?)
                  Get a list of all functions and procedures in an Oracle database(获取 Oracle 数据库中所有函数和过程的列表)
                  Why cannot I create triggers on objects owned by SYS?(为什么我不能在 SYS 拥有的对象上创建触发器?)
                  Returning result even for elements in IN list that don#39;t exist in table(即使对于表中不存在的 IN 列表中的元素也返回结果)
                  Reset Sequence in oracle 11g(oracle 11g 中的重置序列)
                  <i id='ycDmW'><tr id='ycDmW'><dt id='ycDmW'><q id='ycDmW'><span id='ycDmW'><b id='ycDmW'><form id='ycDmW'><ins id='ycDmW'></ins><ul id='ycDmW'></ul><sub id='ycDmW'></sub></form><legend id='ycDmW'></legend><bdo id='ycDmW'><pre id='ycDmW'><center id='ycDmW'></center></pre></bdo></b><th id='ycDmW'></th></span></q></dt></tr></i><div id='ycDmW'><tfoot id='ycDmW'></tfoot><dl id='ycDmW'><fieldset id='ycDmW'></fieldset></dl></div>

                  • <bdo id='ycDmW'></bdo><ul id='ycDmW'></ul>
                    <legend id='ycDmW'><style id='ycDmW'><dir id='ycDmW'><q id='ycDmW'></q></dir></style></legend>
                        <tbody id='ycDmW'></tbody>

                        <small id='ycDmW'></small><noframes id='ycDmW'>

                        <tfoot id='ycDmW'></tfoot>