This week's book giveaway is in the Spring forum.
We're giving away four copies of Spring in Action (5th edition) and have Craig Walls on-line!
See this thread for details.
Win a copy of Spring in Action (5th edition) this week in the Spring forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Knute Snortum
  • Junilu Lacar
  • paul wheaton
Saloon Keepers:
  • Ganesh Patekar
  • Frits Walraven
  • Tim Moores
  • Ron McLeod
  • Carey Brown
Bartenders:
  • Stephan van Hulst
  • salvin francis
  • Tim Holloway

help:java.sql.SQLException: ORA-06550  RSS feed

 
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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...
 
Ranch Hand
Posts: 1085
Java Oracle Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


This is your stored procedure as you say, which takes 3 areguemnt as inputs and returns on output number

isClockingProblem(company,emp,clockingdate) return number




This is how you are calling your stored procedure and passing 4 arguemnts.

CallableStatement cs=conn.prepareCall("{call IFSAPP.WEBASE_UTIL_API.isClockingProblem('DX','DX005010001',?,?)}");




Now you can understand why are you getting the error
PLS-00306: wrong number or types of arguments in call to 'ISCLOCKINGPROBLEM'

Shailesh
 
He was giving me directions and I was powerless to resist. I cannot resist this tiny ad:
Download Free Java APIs to Work with Office Files and PDF
htttp://www.e-iceblue.com/free-apis.html
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!