i want to use a grid in my front end using java. in this grid i want to
fetch the information from the database. can i make such a grid using
jsp.
if yes, can anybody tell me how?
ashutosh
Hi,
Google will help you find out how to use JDBC (Connexion, Statement,
ResultSet).
Once you have your ResultSet object :
<TABLE >
<%
while(resultSet.next()){
%>
<TR>
<TD>
<% resultSet.getString("field1");%>
</TD>
</TR>
<%
}
%>
</TABLE>
in this loop :
resultSet is the ResultSet object you've got from the JDBC request.
field1 is the name of an existing field in your result.
You may also use <th> tags to put the headers of the table (see
ResultSetMetaData).
You may of course use several <td> tags to put several fields on each row.
Regards,
Arnaud
> i want to use a grid in my front end using java. in this grid i want to
> fetch the information from the database. can i make such a grid using
[quoted text clipped - 3 lines]
>
> ashutosh
ashutosh - 13 Apr 2005 10:34 GMT
thanks Arnaud,
but i don't want to use it by creating tables. please tell me if there
is any other way to fetch the database. i want to create the front end
in the same way as we use data grid in VB 6.0 and then fetch the
information in the front end without using tables.
ashutosh
ashutosh - 13 Apr 2005 10:34 GMT
thanks Arnaud,
but i don't want to use it by creating tables. please tell me if there
is any other way to fetch the database. i want to create the front end
in the same way as we use data grid in VB 6.0 and then fetch the
information in the front end without using tables.
ashutosh