This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes JDBC and the fly likes Batch update in EJB Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Batch update in EJB" Watch "Batch update in EJB" New topic
Author

Batch update in EJB

Sri Rangan
Ranch Hand

Joined: Dec 08, 2001
Posts: 160
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

Joined: Dec 08, 2001
Posts: 160
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

Joined: Jul 09, 2001
Posts: 1879

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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Batch update in EJB
 
Similar Threads
How to rollback multiple prepared statements
Regarding Bulk insert
Prepared Statement
Java for batch db update..
When use Batch update,would i must setAutoCommit(false)??