hi,
i have a question...
i use Eclipse but i'm not very advanced in java...
i wrote a sql statement in java by doing this :
and the above sql statement worked perfectly
but i want to do the same with an update sql statement, so here is what i want to do: I have a JTable(the one that the user can edit, and i want each time the user clicks on the jtable ( i can display the table and it's editable and it is changed...) i want the changes to be editable in the database itself.....so here is what i have in mind:
I want to set the string i enter in the text field to be the string in the place of the original string that is already in the table...i have 4 columns...1st one is student id, then the name, then the major , then the year graduated...
for example: if he changed the id of the student called steven from 1 to 6...so i want the 6 to be in the place of the 1 and i want the change to be in the database too and not only on the table....
help?
Nadine, check out how JDBC works for the database updating. The biggest issue is matching table rows with database records. I think you will need a unique field or unique group of fields to represent each record. That field / those fields should be present in the model too; you can hide them from the table by removing table columns if you do not want to show them.