Well first of all the cached rowset is a part of jdbc infrastructure and can't operate without it. A vector on the other hand is just a collection of objects. The RowSet extends ResultSet, it's really just a ResultSet with "beaniness" added. It will have the ability to participate in transactions and all that sort of stuff.
A Vector is part of the Collections API. Really you should be using ArrayList. Anyway you have to have an Object of some from to place into the Collection. So you keep calling ResultSet.next() and reading off each field into some Object type that you've made, then stick that object into your Collection. Once that's done you are finished with the database. >From the RowSet javadoc; The RowSet interface is unique in that it is intended to be implemented using the rest of the JDBC API. In other words, a RowSet implementation is a layer of software that executes "on top" of a JDBC driver. Implementations of the RowSet interface can be provided by anyone, including JDBC driver vendors who want to provide a RowSet implementation as part of their JDBC products. A RowSet object may make a connection with a data source and maintain that connection throughout its life cycle, in which case it is called a connected rowset. A rowset may also make a connection with a data source, get data from it, and then close the connection. Such a rowset is called a disconnected rowset. A disconnected rowset may make changes to its data while it is disconnected and then send the changes back to the original source of the data, but it must reestablish a connection to do so. A disconnected rowset may have a reader (a RowSetReader object) and a writer (a RowSetWriter object) associated with it. The reader may be implemented in many different ways to populate a rowset with data, including getting data from a non-relational data source. The writer can also be implemented in many different ways to propagate changes made to the rowset's data back to the underlying data source. -----Original Message----- From: Saurabh [mailto:[EMAIL PROTECTED]] Sent: Thursday, 10 October 2002 16:27 To: JDJList Subject: [jdjlist] Cached Row set vs vector Hi All, Can anyone tell me what would be the performance differences in using 'cached row sets' vs 'Vector' while retrieving data from database.Of course i would be further displaying this data on the front end using jsp's. ____________________________________________________ To change your JDJList options, please visit: http://www.sys-con.com/java/list.cfm Be respectful! Clean up your posts before replying ____________________________________________________ ____________________________________________________ To change your JDJList options, please visit: http://www.sys-con.com/java/list.cfm Be respectful! Clean up your posts before replying ____________________________________________________
