This discussion is archived
12 Replies Latest reply: Feb 13, 2013 6:47 AM by Timo Hahn RSS

wrong number or types of arguments in call to 'Procedure_Name'

952618 Newbie
Currently Being Moderated
I am calling a Procedure with array type of but its giving me error
"ORA-06550: line 1, column 7:
PLS-00306: wrong number or types of arguments in call to 'VSKU_DETAIL_GRID'
How can I fix this ?



String stmt = "begin xxData_supplwrkbch_functions.VSKU_DETAIL_GRID(?,?,?,?,?,?,?,?); end;";
DBTransaction dbtxn = (DBTransaction)getTransaction();
CallableStatement cs = dbtxn.createCallableStatement(stmt.toString(),1);
int row_ptr = 0;
int col_ptr = 0;
int error_code;
String error_msg;
String[][] outb_vsku_array = new String[300][50];

Connection conn = null;
ArrayDescriptor descriptor_width = null;
ArrayDescriptor descriptor_qty = null;

oracle.sql.ARRAY p_width_Arr = null;
oracle.sql.ARRAY p_qty_Arr = null;
// ARRAY newWidthArray=null;
// ARRAY newQtyArray=null;
try {
conn = getDBTransaction().createCallableStatement("select 1 from dual",1).getConnection();
}
catch (SQLException e)
{
System.out.println("error getting connection object");
}

try
{
System.out.println("setting up descriptor");
descriptor_width = ArrayDescriptor.createDescriptor("XXMSN_VSKU_WIDTH_TYPE", conn);
}
catch (Exception e)
{
System.out.println("Descriptor ERROR - " + e.getMessage());
}

try
{
System.out.println("setting up descriptor");
descriptor_qty = ArrayDescriptor.createDescriptor("XXMSN_VSKU_QTY_TYPE", conn);
}
catch (Exception e)
{
System.out.println("Descriptor ERROR - " + e.getMessage());
}

try
{
p_width_Arr = new oracle.sql.ARRAY(descriptor_width,conn,p_width_ArrData);
//newWidthArray = new ARRAY(descriptor_width,conn,p_width_Arr);
}
catch (Exception e)
{
System.out.println("Array Formation ERROR - " + e.getMessage());
}

try
{
p_qty_Arr = new oracle.sql.ARRAY(descriptor_qty,conn,p_qty_ArrData);
//newQtyArray = new ARRAY(descriptor_qty,conn,p_qty_Arr);
}
catch (Exception e)
{
System.out.println("Array Formation ERROR - " + e.getMessage());
}

cs.setString(1,p_ssku_id);
cs.setString(2,p_dim_2);
cs.setArray(3,p_width_Arr);
cs.setArray(4,p_qty_Arr);
cs.setInt(5,is_blanket);
cs.registerOutParameter(6,OracleTypes.CURSOR);
cs.registerOutParameter(7,OracleTypes.NUMERIC);
cs.registerOutParameter(8,OracleTypes.VARCHAR);
cs.execute(); // Error is here

Edited by: Rahul Sharma 902 on Feb 12, 2013 5:52 AM

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points