| Author |
displaying database records rowwise in the table
|
Abhishek Reddy
Ranch Hand
Joined: Mar 28, 2006
Posts: 259
|
|
How to display database records rowwise in the table?
I have a resultset and each record has to be displayed rowwise in the table...
is it possible?
|
Abhishek
|
 |
Rob Spoor
Sheriff
Joined: Oct 27, 2005
Posts: 19216
|
|
|
Define table. Is it an HTML table? JTable?
|
SCJP 1.4 - SCJP 6 - SCWCD 5
How To Ask Questions How To Answer Questions
|
 |
Jilesh Lakhani
Ranch Hand
Joined: Jul 26, 2006
Posts: 47
|
|
create a table and inside a while loop ..
while(rs.next()) {
<td>rs.getString(1)</td>
}
you can do something like this.... I may be wrong with HTML syntax but hopefully you can take it forward from here.
check with java.sql.resultset
|
-Jilesh
Universe and Knowledge has no bounderies
|
 |
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56185
|
|
Please take the time to choose the correct forum for your posts. This forum is for questions on advanced Java. Not only is this not an advanced question, it's not a general Java question. For more information, please read this.
Assuming that you meant an HTML table, this post has been moved to a more appropriate forum.
|
[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
|
 |
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56185
|
|
A resultset should never get anywhere near the UI or a JSP.
Capture the data from the resultset in an appropriate Java collection and close the resultset as soon as possible. Pass the collection back to the controller for sending to the JSP for display.
|
 |
 |
|
|
subject: displaying database records rowwise in the table
|
|
|