aspose file tools
The moose likes Servlets and the fly likes how to display more than one result from the db.. Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Servlets
Reply Bookmark "how to display more than one result from the db.." Watch "how to display more than one result from the db.." New topic
Author

how to display more than one result from the db..

City Guy
Greenhorn

Joined: Oct 15, 2001
Posts: 2
if (rs != null) {
if (rs.next()) {
xxx = rs.getString("");
xxx = rs.getString("");
xxx = rs.getString("");
xxx = rs.getString("");
xxx = rs.getString("");
this will only disply one record ...
Mahesh Rana
Ranch Hand

Joined: Sep 05, 2001
Posts: 139
<code>
if(rs != null)
{
while(rs.next())
{
x = rs.getString("X");
}
}
</code>


SCJP2
namita pa
Ranch Hand

Joined: Sep 06, 2001
Posts: 56
ya its better to do it in the while loop as it checks all the records in the resultset
------------------
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to display more than one result from the db..
 
Similar Threads
Error in downloading ZipoutputStream
gettting value by column name vs index
describing the table!!!...
WA #1.....word association
Regex | Parse | Split?