Hello, I have a jTable bind on a table to MySql to present it's data. Now I want to add a button so when a user changes values to table and press the button the MySql table will be updated.
May someone propose what is the fastest way to do this?
I was thinking of deleting the table each time the button is pressed get the data from jTable and insert It to table, I have to make this fast so I don't look for the most optimal solution in terms of design, any suggestions?
Regards,
j0e
Update database table from jTable
Page 1 of 12 Replies - 4048 Views - Last Post: 05 September 2011 - 05:34 PM
Replies To: Update database table from jTable
#2
Re: Update database table from jTable
Posted 05 September 2011 - 06:15 AM
Don't delete and re-insert into entire table in the database. That's not an efficient use of resources, plus you don't know who else is accessing the database at that point in time. Just update the row(s) that were updated in the JTable.
#3
Re: Update database table from jTable
Posted 05 September 2011 - 05:34 PM
Quote
Just update the row(s) that were updated in the JTable.
More precisely, just update the row in your JTable model
Page 1 of 1

New Topic/Question
Reply



MultiQuote






|