aspose file tools*
The moose likes JDBC and the fly likes Result Set size problem? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Result Set size problem?" Watch "Result Set size problem?" New topic
Author

Result Set size problem?

faisal ishaque
Greenhorn

Joined: Feb 21, 2003
Posts: 14
Hello,
I have a problem to get the exact size of result set. Let us assume that my query get 20 results and another query get 30 results, now how can i adjust the size of my collection (array) dynamically to adjust w.r.t result set size.
I use some technique that first get the count then perform another query for results , but this does not seems to be a good technique because there are some restriction of using ORACLE COUNT METHOD.
Can any one give me the best practices for setting collection(array) size w.r.t the result set size.
thanks and best regards.
Faisal Ishaque
Joe Ess
Bartender

Joined: Oct 29, 2001
Posts: 8968
    
    9

Use a data structure that grows dynamically, like java.util.ArrayList.


[How To Ask Questions On JavaRanch]
 
wood burning stoves
 
subject: Result Set size problem?