java - Building resultset using collection object -


I had a problem creating resultset using Java. Here it goes ...

I am collecting the collection object which is organized as a result of the line taken from the object and the collection object in the cache (which is the form of vector / array list Is stored in) Recovering the same archive object here I need to re-create the results again by using the collection object. Now my doubt is possible in this way or not Is not resultset building? Please tell me the ASP.

Thank you in advance,

Bhaskar

best The idea is that if you are using a collection instead of a cache, then instead of consequent one has to use. CachedRowSet is a suburb of ResultSet, but the data is already cached. It is much easier than writing all the data in an ArrayList. Cached-Routets can also question themselves.

Cached Rosets Set; ....................... ....................... Integer ID; String name; While (rsnext ()) {if (rs.getInt ("id") == 13} {id = rs.getInt ("id"); Name = rs.getString ("name")); }}

Whenever you need the information, you only call the cached robot. This is good as a nearly chopped roti :)

Edit:
There are no set methods for ResultSet, while there are update methods. The problem with using the update method for the purpose of rebuilding ResultSet is to select a line to update it. Once ResultSet has freed itself, all the rows have been set to clear. A null reference can not be called. A list of lists only imitates a result, or more accurately, an array of arrays, as a result imitates.

While vector threads are safe, they have a huge upper section. Use an Arlist instead. Since each nested list is made and the external nest is placed on the list, insert it in this way.

  Nest.ed (collections unmodified list (nested));  

After inserting nested lists, return the Nest List as an umodifiableList too, it will give you a thread-safe archive without the upper part of the vector.


Comments