Meaningless Drivel is fun!*
The moose likes JDBC and the fly likes how can I have multiple return from this method? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "how can I have multiple return from this method?" Watch "how can I have multiple return from this method?" New topic
Author

how can I have multiple return from this method?

sahar sa
Ranch Hand

Joined: Jul 06, 2009
Posts: 102
hi,
I want the select method to select some data from DB and then return it . but i dont know how can I return multiple or a row of data ?
can you give me an idea how can i do it?

here is the code which i used for my select query:


thnx,
Sahar.
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

You will need to go through your ResultSet and assign its values to a Collection of objects.

(And you've probably already noticed, but that is a delete statement, not a select query)


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how can I have multiple return from this method?
 
Similar Threads
problem in returning data using resultset
can not insert to DB after a while!
closing connection?
reasons for error: SQLException: No operations allowed after connection closed?
select .... where... query for a variable?