So i have a JTable displaying my search results. It has three columns, Nationality, First_Name and Last_Name, and 9 rows of data. Now i have decided for the sake of simplicaty till i get used to this, when the user clicks the update button, the new table model will just replcae everything in the database, so no need for any model listeners or hash codes, lol, etc.
So this is how it should be:
JTable displaying
9 rows of data
User edits this JTable
New table model sent
to database and replaces
table with the old data
So i have started the statement
Code:
String sql = "UPDATE tblCompetitor " +"SET Nationality = ?, First_Name = ?, Last_Name = ? " +"WHERE roundType2 = ? " +"AND eveType2 = ?";
This is mainly related to java which is why the sql statement looks different. And i know i shouldnt be using parameters but java allows you to do this which is why i have the ? What i really need to know is whether i am doing the format of the update correctly. If you had a table in your database, with 3 columns and 9 rows, and you wanted to update it completely with a whole new set of 9 rows, how would you perform this using the update statement?
cheers
|