Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Batch update in EJB

 
Sri Rangan
Ranch Hand
Posts: 160
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am trying to make a batch update work in EJB.
The following sample code works fine inside EJB:

But the foll0wing code causes "invalid batch command" Exception. I am not able to understand what is going wrong. The only difference here is I am creating the arraylist of objects and looping thru the array list to create my batch.

Thanks for your help
 
Sri Rangan
Ranch Hand
Posts: 160
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In fact i am getting the "java.sql.Exception: missing in or out parameter at index:: 1"
But it seems I am setting all the parameter correctly.
 
Jamie Robertson
Ranch Hand
Posts: 1879
MySQL Database Suse
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Sri Rangan:
In fact i am getting the "java.sql.Exception: missing in or out parameter at index:: 1"
But it seems I am setting all the parameter correctly.

you'll have to let us know what SQL is prepared ( QUERY_RET_DETAILS ). Otherwise, it looks fine.
Jamie
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic