I am using two ResultSet in a single statement..this code is a part of servlet..
String temp=request.getParameter("cid");
int cid= Integer.parseInt(temp);
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection con = DriverManager.getConnection("jdbc:odbc:Mydatasource");
PreparedStatement ps = con.prepareStatement("select * from Products where cid=?");
ps.setInt(1, cid);
ResultSet rs = ps.executeQuery();
while(rs.next())
{
out.println("<a href = 's_BikeServlet?pid="+ rs.getInt(1) + "'>" + "rs.getString(2)" + "</a>");
//rs.getString get the name of the bike which has to be made a hyperlink
}
but when i run this.it give java.sql.SQLEXCEPTION (No Data found)..but when i use only single ResultSet it Displays correctly..