wood burning stoves 2.0*
The moose likes JDBC and the fly likes How to insert 100’s of records in to database? 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 "How to insert 100’s of records in to database?" Watch "How to insert 100’s of records in to database?" New topic
Author

How to insert 100’s of records in to database?

cherry hal
Greenhorn

Joined: May 06, 2012
Posts: 10
please tell me with sample code....How to insert 100’s of records in to database fromB java with out going multiple hits to DB?
Bill Clar
Ranch Hand

Joined: Sep 21, 2006
Posts: 150

When you say 'multiple hits', are you referring to DB connections?
Ishant Agarwal
Greenhorn

Joined: Sep 09, 2011
Posts: 22
You can use a batch execution...

For this you can use below code:-


[Rob]Removed unrelated link[/Rob]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to insert 100’s of records in to database?
 
Similar Threads
pre-compile and prepared statement
addBatch - help/ideas?
Inserting multiple record in DB using for loop
JDBC DB2 database hits
Serializability and recoverability