2 Replies - 4048 Views - Last Post: 05 September 2011 - 05:34 PM Rate Topic: -----

#1 j0e   User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 46
  • Joined: 01-June 08

Update database table from jTable

Posted 05 September 2011 - 01:14 AM

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

Is This A Good Question/Topic? 0
  • +

Replies To: Update database table from jTable

#2 macosxnerd101   User is offline

  • Games, Graphs, and Auctions
  • member icon




Reputation: 12800
  • View blog
  • Posts: 45,992
  • Joined: 27-December 08

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.
Was This Post Helpful? 0
  • +
  • -

#3 pbl   User is offline

  • There is nothing you can't do with a JTable
  • member icon

Reputation: 8381
  • View blog
  • Posts: 31,956
  • Joined: 06-March 08

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
Was This Post Helpful? 1
  • +
  • -

Page 1 of 1