aspose file tools*
The moose likes JDBC and the fly likes How to convert from database to Java Collection? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "How to convert from database to Java Collection?" Watch "How to convert from database to Java Collection?" New topic
Author

How to convert from database to Java Collection?

ramanuja varun
Ranch Hand

Joined: Aug 31, 2007
Posts: 47
how to persist data from a database to a java collection(eg list)

i have a table in oracle and want to do some processing on it in java. how to get it in collections

[Please UseAMeaningfulSubjectLine - Dave]
[ February 26, 2008: Message edited by: David O'Meara ]
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

There is no "get results as collection" method in JDBC. You will need to iterate through a ResultSet adding each record to whichever Collection implementation you want.


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
 
Don't get me started about those stupid light bulbs.
 
subject: How to convert from database to Java Collection?