Toad World® Forums

PLS-00306: wrong number or types of arguments in call to...


#1

I’m using TOAD for Oracle V9.7.2.5
Oracle 8i

I’m trying to use Debug to “Run to Cursor”

The code is as follows:

CREATE OR REPLACE PACKAGE MOSES.PKG_RPT_SALES_08
AS
TYPE RPT_SALES_08_CURSOR IS REF CURSOR;

FUNCTION GetQuoteInvoicedTotal(v_OSNO IN NUMBER,
                               v_INVOICE_NO IN NUMBER)
RETURN NUMBER;

PROCEDURE PROC_RPT_SALES_08 (v_Org_ID IN NUMBER,
                             v_OSNo IN NUMBER,
                             v_Cust_No IN NUMBER,
                             v_From_Date IN VARCHAR2,
                             v_To_Date IN VARCHAR2,
                             RTN_CURSOR OUT RPT_SALES_08_CURSOR,
                             v_ERROR_CODE OUT VARCHAR2);

CREATE OR REPLACE PACKAGE BODY MOSES.PKG_RPT_SALES_08 AS


#2

It looks like you need to initialize the cursor in the anonymous block. Note
that Toad comments it out and adds a comment to initialize the value. Greg
DECLARE V_ORG_ID NUMBER; V_OSNO NUMBER; V_FROM_DATE
VARCHAR2(32767); V_TO_DATE VARCHAR2(32767); RTN_CURSOR
MOSES.PKG_RPT_SALES_08.RPT_SALES_08_CURSOR; V_ERROR_CODE VARCHAR2(32767);
BEGIN V_ORG_ID := 10; V_OSNO := 10678; V_FROM_DATE :=
‘01/01/2011’; V_TO_DATE := ‘23/03/0211’; – RTN_CURSOR :=
NULL; Modify the code to initialize this parameter V_ERROR_CODE :=
NULL; MOSES.PKG_RPT_SALES_08.PROC_RPT_SALES_08 ( V_ORG_ID, V_OSNO,
V_FROM_DATE, V_TO_DATE, RTN_CURSOR, V_ERROR_CODE );-- Line 17 COMMIT;
END;