• 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
 
Of course, I found a very beautiful couch. Definitely. And this tiny ad:
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!