• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Parameter index of 1 is out of range (1, 0) while registering out parameter

 
vipul javeri
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I am getting the error Parameter index of 1 is out of range (1, 0) when i try to register out parameter for the procedure.
Please tell me what is wrong with my code


The procedure in MYSQL is ::



Please help
Thanks in advance.
 
Pramod Kankure
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think you have to use { in your stored procedure call. So try con.prepareCall("{ call storeprocedurename(?, ?) }");
 
vipul javeri
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I tried with that also.. but it dint solve the issue
 
vipul javeri
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This issue is solved. The problem was of jar file , earlier i was using mysql-connector-java-5.1.18-bin.jar and when i changed the jar to mysql-connector-java-5.1.18-bin.jar it worked..Thanks
 
vipul javeri
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
one more thing.. the out parameter should be before the IN parameters... is this a bug for calling mysql procedure through Java??
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic