Using Varrays as Stored Procedure parameter types [message #8510] |
Wed, 27 August 2003 05:50 |
Mark Grimshaw
Messages: 73 Registered: June 2002
|
Member |
|
|
All,
I seem to be constantly getting the error PLS 00306 (wrong number or type of arguments) when I try to use a stored procedure in a package from a trigger in another schema.
In essence I am trying to do this: -
-- Function declaration in s.p package
Type MyArrayT Is Varray(100) of varchar2(3);
FUNCTION MyFunction(ArrayParam IN MyArrayT) Return Boolean;
I have a table, lets say called MyTable (in another schema called MySchema) with a column that is also a varray: -
VarrayCol MyArray2T
where MyArray2T is defined as a varray(100) of varchar2(3) - the same as MyArrayT above.
The statement below in a trigger on the table MyTable results in the above error: -
IF MySchema.MyPackage.MyFunction(:new.VArrayCol) THEN ...
Can't seem to spot the problem - can anyone else?
TYIA
Mrk Grimshaw
|
|
|
Re: Using Varrays as Stored Procedure parameter types [message #8518 is a reply to message #8510] |
Wed, 27 August 2003 16:46 |
|
Barbara Boehmer
Messages: 9090 Registered: November 2002 Location: California, USA
|
Senior Member |
|
|
It needs to be the same object type, not just an object type with the same structure, so you will have to change your function declaration to use the MyArray2T from Myschema, instead of MyArrayT:
FUNCTION MyFunction(ArrayParam IN MySchema.MyArray2T) Return Boolean;
|
|
|