| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.misc -> Error ORA-06550 PLS-00306
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:
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
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;
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
![]() |
![]() |