posted 18 years ago
I have a stored procedure.
The name of stored procedure is isClockingProblem(company,emp,clockingdate) return number.
0=ok,1=no clocking, 2=no out data.
So i want to call the stored procedure, but i get error:
SystemErr R java.sql.SQLException: ORA-06550: line 1, column 7:
PLS-00306: wrong number or types of arguments in call to 'ISCLOCKINGPROBLEM'
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored
my code:
try
{
System.out.println("Calling a procedure");
CallableStatement cs=conn.prepareCall("{call IFSAPP.WEBASE_UTIL_API.isClockingProblem('DX','DX005010001',?,?)}");
cs.setTimestamp(1,new Timestamp(new java.util.Date().getTime()));
cs.registerOutParameter(2,Types.INTEGER);
cs.execute();
int a=cs.getInt(2);
cs.close();
System.out.println("Nilai"+a);
}catch(SQLException err)
{
err.printStackTrace();
}catch(Exception er)
{
er.printStackTrace();
}finally
{
System.out.println("finally");
conn.close();
}
please give me asolution to solve it...