This week's book giveaway is in the Other Languages forum.
We're giving away four copies of Functional Reactive Programming and have Stephen Blackheath and Anthony Jones on-line!
See this thread for details.
Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to do Batch updates?

 
Laura Mike
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi again with a new problem.
How can i do batch updates in java.
mean whetehr we have any built in method to do batch insert,delelet,etc..
again ur help will be highly appreciated
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Check out java.sql.Statement's addBatch(String) and executeBatch()
Dave.
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Oh, and if your update statements are very similar, you should probably play with java.sql.PreparedStatement's addBatch()
 
Laura Mike
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanx David..i am trying to do it right now...
I am also planning to make my code talk to sql server database. in that situation what i have todo for migrating from Access tSQL server.like if i have to wite new queries or not. and any other issue to be consider for migration.
Also tell me if there is any example of connection to sql server is available i.e. how i will connect to sql server.(hey its not I (me) but my java app)
bye.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic