my dog learned polymorphism*
The moose likes JDBC and the fly likes get multiple value Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "get multiple value " Watch "get multiple value " New topic
Author

get multiple value

raya jaya
Greenhorn

Joined: Apr 18, 2012
Posts: 2
hello,
when i execute this code, it just give me one studentID number


how cn i get more than one number of studentID

[Added code tags - see UseCodeTags for details]
William P O'Sullivan
Ranch Hand

Joined: Mar 28, 2012
Posts: 860

Welcome raya,

Sorry to be honest, It seems you need to do some more basic Java programming.

Your if statement is working fine. The result set has a "next" (or first) record,
you add it to the collection, then leave the if. There could be 10000 more results.

Try reading about loops and in particular the "while" statement.

WP
raya jaya
Greenhorn

Joined: Apr 18, 2012
Posts: 2
thank you
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: get multiple value
 
Similar Threads
Hibernate project Exception
inheritance homework assignment - im stuck
sql query
sending parameter from one controller to other
Need help in generating a second vector list from the frist vector which...