Last week, we had the author of TDD for a Shopping Website LiveProject. Friday at 11am Ranch time, Steven Solomon will be hosting a live TDD session just for us. See for the agenda and registration link
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
  • Piet Souris
  • Himai Minh

Problem in inserting record,,1st rec is added once, 2nd record is added twice, and so on,,,!!

Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i m getting a problem in my project when i m inserting a record in database (MS ACCESS). i click on add button on main frame and a new frame is opened for adding details
i add details and click on save button and a function refresh is called, record gets inserted. now again i want to insert a new record i do same thing, but this time record is inserting two times and if i insert 3rd time insertion is 3 times and so on,,,i have used a list to show only column 1 entries of db and all labels to show all entries on the same frame ie the main frame.

Posts: 75700
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Welcome to the Ranch

I am afraid nobody is going to look through over 600 statements to find your error. I have tried to improve your code by adding code tags, which simply highlighted how inconsistent your indentation was, with multiple statements per line, and some very long lines. I have got rid of the long lines, but made the indentation look even worse.
I notice some empty catch blocks. Those are dangerous; you are hiding errors from yourself.

You will have to boil this down to something small and simple, not more than about 50 lines, which demonstrates the error, (ie an SSCCE), then we can understand it and can help.
Get me the mayor's office! I need to tell her about this tiny ad:
Free, earth friendly heat - from the CodeRanch trailboss
    Bookmark Topic Watch Topic
  • New Topic