Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Error ORA-06550 PLS-00306

Error ORA-06550 PLS-00306

From: jose luis <zaratustra.jl_at_gmail.com>
Date: 2 Feb 2006 08:14:05 -0800
Message-ID: <1138896845.029062.104650@o13g2000cwo.googlegroups.com>


Hi

Im trying to call a Functon in a package in Oracle 9i, from VBscript but i'm getting the following error:

ORA-06550: line 1, column 7:
PLS-00306: wrong number or types of arguments in call to 'IS_NEW_LSTEQ'
ORA-06550: line 1, column 7:

PL/SQL: Statement Ignored
Line No: 253

Im trying to get the return value and the p_msg OUT parameter, from the function is_New_LstEq, and use them in VBscript.

How can i do this?

Thanks in advance

This is the code of my function in Oracle

PACKAGE Xxex_Ws_Pkg AS

   FUNCTION is_New_LstEq       ( p_msg              OUT VARCHAR2,
                                 p_propertynum   IN     VARCHAR2 )
RETURN NUMBER; END Xxex_Ws_Pkg;

PACKAGE BODY Xxex_Ws_Pkg AS

 FUNCTION is_New_LstEq ( p_msg              OUT VARCHAR2,
                           p_propertynum   IN     VARCHAR2 ) RETURN
NUMBER
    IS
      CURSOR c_verify_lsteq IS
         SELECT COUNT(*)
         FROM   XXEX_SYNC_EPAPER_PO sep
         WHERE  sep.propertynum = p_propertynum
         AND    sep.status_epaper = 'A'
         AND    sep.wm_status = 'L';

      is_new_lsteq_flag   NUMBER := 0;
   BEGIN
      OPEN c_verify_lsteq;
      FETCH c_verify_lsteq INTO is_new_lsteq_flag;
      CLOSE c_verify_lsteq;

      IF is_new_lsteq_flag > 1 THEN
         p_msg := 'Hay más de un Listado de Equipo activo (' ||
TO_CHAR(is_new_lsteq_flag) ||
                  ') para el No. de Propiedad: ' || p_propertynum;
         RETURN is_new_lsteq_flag;
      ELSE
         RETURN is_new_lsteq_flag;
      END IF;
   EXCEPTION
      WHEN OTHERS THEN
         p_msg := SQLERRM;
         RETURN -1;

   END; END Xxex_Ws_Pkg;

This is the code in VBScript its trying to call the Oracle function

Function pruebaINTCOM()

Set DBConnection = CreateObject("ADODB.Connection")

	DBConnection.ConnectionString = "Provider=OraOLEDB.Oracle;" & _

"Data Source=XXXX;" & _
"User Id=xxxx;" & _
"Password=xxxx;"
DBConnection.Open adCmdStoredProc = 4 adParamReturnValue = 4 adParamInput = 1 adParamOutput = 2 adVarChar = 200 adInteger = 3 Set objCommand = CreateObject("ADODB.Command") objCommand.CommandText = "XXEX_WS_PKG.IS_NEW_LSTEQ" objCommand.CommandType = adCmdStoredProc objCommand.ActiveConnection = DBConnection

    Set objParm2 = objCommand.CreateParameter("p_msg", adVarChar, adParamOutput, 255)

    objCommand.Parameters.Append objParm2

    Set objParm3 = objCommand.CreateParameter("p_propertynum", adVarChar, adParamInput, 255, "10MON000023")

    objCommand.Parameters.Append objParm3

    Set objParm4 = objCommand.CreateParameter("is_new_lsteq", adInteger, adParamReturnValue)

    objCommand.Parameters.Append objParm4

        objCommand.Execute ' Here is where the error appears    

        DBConnection.Close

End Function Received on Thu Feb 02 2006 - 10:14:05 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US