posted 16 years ago
You're coming up short by just plain failing to use a WHERE clause. At least in that last post, you don't have any WHERE in your SQL.
The first thing that needs to happen is for each row in your table to correspond to a row in the database. If you don't have that connection then your design is broken. So let's assume you have that. The next thing you need is to be able to find the primary key for the row in the database table, given the row in the GUI table. If you can't do that then, again, your design is broken. A common way to do that is to have the key field (or fields) be a column of your GUI table.
Now generate an SQL update which looks roughly like this:
Modify that to suit your actual data. And do use a PreparedStatement, you'll find it a lot easier to deal with.