wood burning stoves 2.0*
The moose likes JDBC and the fly likes Problem in inserting record,,1st rec is added once, 2nd record is added twice, and so on,,,!! 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 "Problem in inserting record,,1st rec is added once, 2nd record is added twice, and so on,,,!!" Watch "Problem in inserting record,,1st rec is added once, 2nd record is added twice, and so on,,,!!" New topic
Author

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

varun nurav
Greenhorn

Joined: Jul 23, 2011
Posts: 4
Hello,
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.


Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 37865
    
  22
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Problem in inserting record,,1st rec is added once, 2nd record is added twice, and so on,,,!!
 
Similar Threads
Getting sql error [Microsoft ][odbc microsoft access driver]numeric index out of range
How to distinguish between two different button clicks on servlet
Exception Null
The INSERT INTO statement contains the following unknown field name: 'OPANo'.
Why no any plotting?