• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Liutauras Vilda
  • Henry Wong
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
Bartenders:
  • Piet Souris
  • Mikalai Zaikin
  • Himai Minh

Problem in displaying rows of the column in jsp

 
Ranch Hand
Posts: 349
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 1512
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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...
}
 
reply
    Bookmark Topic Watch Topic
  • New Topic