Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
cherry hal
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 163
Eclipse IDE Java Tomcat Server
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When you say 'multiple hits', are you referring to DB connections?
 
Ishant Agarwal
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can use a batch execution...

For this you can use below code:-


[Rob]Removed unrelated link[/Rob]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic