Results 1 to 4 of 4
  1. #1
    cchan2 is offline Member
    Join Date
    Feb 2012
    Posts
    5
    Rep Power
    0

    Default How to code commit at every 1000 deletes from a table in java?

    I tried to add the count, each delete will do count++. Then the 'IF' statement count % 1000 == 0, it will do commit. It will do commit, however, the program stop right after the commit because resultset that it uses to delete is gone.

    Any sample code will help me solve my problems? Thanks.

  2. #2
    wsaryada is offline Senior Member
    Join Date
    Jun 2007
    Location
    Bali, Indonesia
    Posts
    757
    Rep Power
    7

    Default Re: How to code commit at every 1000 deletes from a table in java?

    Are you trying to do a batch delete?

  3. #3
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    11,450
    Rep Power
    18

    Default Re: How to code commit at every 1000 deletes from a table in java?

    To add to the previous post, what are you doing?
    What SQL are you using?
    You're not doing a query and then looping through the resultset deleting things are you?
    Please do not ask for code as refusal often offends.

  4. #4
    DarrylBurke's Avatar
    DarrylBurke is offline Member
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,189
    Rep Power
    19

    Default Re: How to code commit at every 1000 deletes from a table in java?

    Moved from Advanced Java

    db
    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

Similar Threads

  1. Replies: 0
    Last Post: 05-07-2012, 10:10 PM
  2. Win 1000$ Now [Java WebApp]
    By biz in forum Java Software
    Replies: 1
    Last Post: 10-01-2011, 07:17 PM
  3. How to Commit to tortoise SVN Using JAVA
    By deshmukh.niraj04 in forum New To Java
    Replies: 1
    Last Post: 09-07-2011, 04:38 PM
  4. EntityManager.setFlushMode(COMMIT) Vs. Query.setFlushMode(COMMIT)
    By CatchSandeepVaid in forum Enterprise JavaBeans (EJB)
    Replies: 0
    Last Post: 12-15-2009, 05:07 PM
  5. Replies: 0
    Last Post: 08-15-2009, 08:30 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •