The answer to your question should be the ResultSet class. It let you manage a cursor over a query from a datasource. It also has methods that allows the updating of the underlying database. The constants list gives you an idea about the parametrization and capabilities of this component: CLOSE_CURSORS_AT_COMMIT, CONCUR_READ_ONLY, CONCUR_UPDATABLE, FETCH_FORWARD, FETCH_REVERSE, FETCH_UNKNOWN, HOLD_CURSORS_OVER_COMMIT, etc.
As a member of the JDBC API, it is independent of the datasource (MS SQL 2000 in your case), all you must have is the proper driver for the database. (With the MS SQL db you can also use a JDBC-ODBC bridge).
About the cache time, I should read more about it but, as I understand, the resulting data from the query will stay available until the statement or the connection are closed, so you can manage the staying time through the connection object. But again, I'm not sure.
Hope it helps.
Pedro Andrés Solorzano
Pontificia Universidad Javeriana
Bogotá, Colombia, SurAmérica.
Let me know if this post have actually helped you, by clicking the purple star.
I would like to query these 5 records and create another recordset from the original 5 record recordset without having to connect back to the database.
for ResultSet manipulation. You can update data within the exisitng ResultSet ...
However I'm not sure what you mean by " create another recordset from the original 5 record recordset ".
A ResultSet is created by the JDBC driver, I don't belive you can 'build your own'. If you need to query the data from your original ResultSet, then I would suggest dumping it a file or some object, and proceeding with further manipulation that way.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.