wood burning stoves 2.0*
The moose likes JDBC and the fly likes Problem in displaying rows of the column in jsp Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Problem in displaying rows of the column in jsp" Watch "Problem in displaying rows of the column in jsp" New topic
Author

Problem in displaying rows of the column in jsp

Rashid Ali
Ranch Hand

Joined: Jan 16, 2001
Posts: 349
I have made a simple application using java bean, and jsp and database using Access.
There are 5 rows in database (db) i.e. employeeID, Name and Salary. I call this db through java bean with ResultSet after making proper Connection and Statment and then display it using jsp file.
But problem is this that it is only displaying 1 line of record even though i want to have all the records of database using 'select * from empData'.
Could you please give an example or suggestion that how can i get all the records of my database through jsp.
Thanks/regards
Rashid Ali
Bosun Bello
Ranch Hand

Joined: Nov 06, 2000
Posts: 1510
You need to iterane through the result set until you hit the end of it.
Assuning rs is your resultset...
while(rs.next())
{
print out each column in it...
do whatever...
}


Bosun (SCJP, SCWCD)
So much trouble in the world -- Bob Marley
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Problem in displaying rows of the column in jsp
 
Similar Threads
Best practice to access large data from database
Add checkbox in JTable
communication between servlets & JSPs
How to use Actions inside Javascript menus???
retrieving thousand of rows from DB2 database