This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes JDBC and Relational Databases and the fly likes get multiple value Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "get multiple value " Watch "get multiple value " New topic

get multiple value

raya jaya

Joined: Apr 18, 2012
Posts: 3
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: 859

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.

raya jaya

Joined: Apr 18, 2012
Posts: 3
thank you
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link:
subject: get multiple value
It's not a secret anymore!