TrainBeaser for iPhone
The moose likes Oracle/OAS and the fly likes VARRAY is Stored Proc out param, throws exception ORA-06550 Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Products » Oracle/OAS
Reply Bookmark "VARRAY is Stored Proc out param, throws exception ORA-06550" Watch "VARRAY is Stored Proc out param, throws exception ORA-06550" New topic
Author

VARRAY is Stored Proc out param, throws exception ORA-06550

ajay khandelwal
Greenhorn

Joined: Oct 01, 2002
Posts: 2
Hello,
I have a stored procedure definiation as follows
procedure main(p_rma_varr in out rma_varr,
p_rma_locations_varr in out rma_locations_varr,
p_rma_repair in out rma_repair_detail_varr, p_rma_invoice_varr in out rma_invoice_varr, p_mode in varchar2,
retcode out number,errbuff out varchar2);
i have java code to register and load in out parameters as follows
StructDescriptor sd_rma = StructDescriptor.createDescriptor("RMA_V",con);
StructDescriptor sd_location = StructDescriptor.createDescriptor("RMA_LOCATIONS_V",con);
StructDescriptor sd_invoice = StructDescriptor.createDescriptor("RMA_INVOICE_V",con);
StructDescriptor sd_rep_det = StructDescriptor.createDescriptor("RMA_REPAIR_DETAIL_V",con);
STRUCT st_rma = new STRUCT(sd_rma,con,o_rma);
STRUCT st_location = new STRUCT(sd_location,con,o_location);
STRUCT st_invoice = new STRUCT(sd_invoice,con,o_invoice);
STRUCT st_rep_det = new STRUCT(sd_rep_det,con,o_rep_det);
CallableStatement cstmt = con.prepareCall("{call RMA_MAIN_PKG.main(?,?,?,?,?,?,?)}");
cstmt.setObject(1,st_rma);
cstmt.setObject(2,st_location);
cstmt.setObject(3,st_invoice);
cstmt.setObject(4,st_rep_det);
cstmt.setString(5,"insert");
cstmt.registerOutParamete(6,OracleTypes.NUMBER);
cstmt.registerOutParameter(7,OracleTypes.VARCHAR);

cstmt.registerOutParameter(1,OracleTypes.STRUCT,"RMA_V");
cstmt.registerOutParameter(2,OracleTypes.STRUCT,"RMA_LOCATIONS_V");
cstmt.registerOutParameter(3,OracleTypes.STRUCT,"RMA_INVOICE_V");
cstmt.registerOutParameter(4,OracleTypes.STRUCT,"RMA_REPAIR_DETAIL_V");
cstmt.execute();
Compiles fine, at execution throws exception saying ORA-06550 Line 1 Column 7:
PLS-00306: wrong number or types or arguments in call 'MAIN'
ORA-06550: line 1 Column 7
Any help .... appreciated in advance.
Thanks
Ajay
Samira Mastali
Ranch Hand

Joined: Aug 03, 2001
Posts: 74
Hi,
I have the same problem and it is too urgent.
Any help?
Thanks,
Samira
SJ Adnams
Ranch Hand

Joined: Sep 28, 2001
Posts: 925
Post the definition of "rma_varr" if it's VARRAY then use
ArrayDescriptor desc = ArrayDescriptor.createDescriptor("rma_varr", con);
ARRAY newArray = new ARRAY(sd_rma , con, o_rma);
also your out parameters are mixed types?
 
 
subject: VARRAY is Stored Proc out param, throws exception ORA-06550
 
Threads others viewed
Need Help with pl/sql (Compilation Error)
Can a oracle Stored procedure return a cursor as a return value?
I have a pl/sql function that returns an Array
Oracle9i wrong number or types of arguments in call to...
Java - Passing Object to Storeprocedure (Spring JDBCTemplate)
MyEclipse, The Clear Choice