File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JDBC and the fly likes Santanu Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Santanu" Watch "Santanu" New topic
Author

Santanu

San De
Greenhorn

Joined: Sep 14, 2008
Posts: 1
I need to insert multiple row into a table by using a stored procedure.I set the input parameter for this SP inside a foor loop and execut this SP. but I think its very costly. because inside a for loop every time i am calling sp.execute. suggest me the most efficient way to insert multiple records inside a table.
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 29261
    
140

I don't understand how the subject relates to your post.

The most efficient way to do multiple updates is to use JDBC batch updates. This reduces the number of database roundtrips.

Since this is about JDBC, I'll move it to our JDBC forum for you.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Santanu
 
Similar Threads
Know auto incremented pimary key
JDBC insert too slow
How to insert record into multiple table uesing preparedStatement (one time i want to insert record)
Clarification
JDBC inserts too slow