Reputation: 1
We have a user-defined datatype in Oracle which is used in a procedure as an input argument. We are trying to call this procedure from Pro*C. In Oracle, the user-defined data type is VARRAY(21) of VARCHAR2(500).
In Pro*C we tried similar to the sample program 9 in https://docs.oracle.com/cd/B12037_01/appdev.101/a97269/pc_07pls.htm#i2344
On compiling we are getting the error "Wrong number or types of arguments in call". Pro*C code
Any help on how to pass an array to a procedure is appreciated.
Upvotes: 0
Views: 151
Reputation: 3382
Pay attention that this declaration is happening into an EXEC SQL EXECUTE
block, while you're doing it into a DECLARE SECTION
.
Do the declaration and assignment like this:
EXEC SQL EXECUTE
DECLARE
/* your declaration here*/
BEGIN
/* call to the procedure here*/
END;
END-EXEC;
Upvotes: 0