posted 17 years ago
How do I know what record to update? Yes, I realize this depends on how I design everything else. I'm using an algorithm based on position in the file for the recNo. I read strings out of the file, and populate the table model. Right now I am not putting the recNo as a column in the table model. My GUI uses a text box to get the customer number, and based on the line in the JTable that is highlighted, will want to update the database file that the record is now reserved. But I lost the recNo to use. I thought about building a map of JTable row to database recNo, but then wasn't sure how to keep that updated if I allow the columns to be sorted. Could be cheap and remove column sorting. Or I could add recNo as a column in the JTable, and use that, sorta like how the upc value is used in the "Denny DVD" example.
Can anyone provide any thoughts?