I have a java.sql.ResultSet object containg data from a query that was run.
How do I refresh the data in the ResultSet to reflect the current data in the database?
Thanks!
I have a java.sql.ResultSet object containg data from a query that was run.
How do I refresh the data in the ResultSet to reflect the current data in the database?
Thanks!
The best answer is that you need to close the ResultSet
and issue the query again, to get a new ResultSet
. The slightly longer answer is that it's possible to set the transaction isolation level to let you see other transaction updates while iterating, but, that's not probably what you mean.