Hi all,
How to display search results from MYSQL database in JSP page??
is it possibile to create gridview in jsp page?
please help
<%
try{
Class.forName("org.apache.derby.jdbc.ClientDriver");
con=DriverManager.getConnection("jdbc:derby://localhost:1527/Employee");
stmt=con.createStatement();
ResultSet rs=stmt.executeQuery("select uname,regno from emptbl");
while(rs.next()){
%>
<table>
<tr>
<td>rs.getString(1)</td> // 1 indicates coloum number(uname)
<td>rs.getString(2)</td>
</tr>
</table>
<%
}
}
catch(Exception e)
{
}
finally
{
try {
stmt.close();
con.close();
}
catch (Exception ex) {
}
}
%>
thanku for ur codes..
datagird option is possible?
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.