Register / Login
Swing / AWT / SWT
Filter ResultSet in JTable
posted 10 years ago
I have a
in my application that displays the data in a ResultSet. I also gave the user the ability to filter this list by some of the fields (user,jobNumber, etc).
Currently the filter causes another database query with a WHERE clause then updates the
using model.setResultSet(rs) and model.fireTableDataChanged() calls with the new ResultSet.
Since the original list contains all of the records I would like to avoid hitting the database a second time just to hide some of the records and a third time just to show what I had originally!
Is there a way to allow filtering of a ResultSet in a
without replacing the ResultSet?
JTable & JDBC