VARRAY is Stored Proc out param, throws exception ORA-06550
ajay khandelwal
Greenhorn
Joined: Oct 01, 2002
Posts: 2
posted
0
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
posted
0
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
posted
0
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