aseelad
asked on
nested result set
i got this problem i do not way :$
WARNING: StandardWrapperValve[jsp]: PWC1406: Servlet.service() for servlet jsp threw exception
java.sql.SQLException: Operation not allowed after ResultSet closed
i have tryed every thing :(
</tr>
<%
Class.forName("com.mysql.j dbc.Driver ").newInst ance();
connection = DriverManager.getConnectio n(connecti onURL, "root", "1212");
statement = connection.createStatement ();
int num=0;
rs = statement.executeQuery("SE LECT * FROM webpage");
while (rs.next()) {
%>
<tr class="odd" >
<%
out.print(rs.getString("id "));
num=Integer.parseInt(rs.ge tString("i d"));
rs2 = statement.executeQuery("SE LECT * FROM textspace where WPID="+num);
while (rs2.next())
{
%>
<td class="zname"><b><%=rs2.ge tString("c pc")%></b> </td>
<td class="size"><%=rs2.getStr ing("Money Gained")%> <br/>Inlin e</td>
<td class="approve">Yes</td>
<td class="clicks"><%=rs2.getS tring("Num berOfClick s")%></td>
<td><input type="button" onclick="<%response.sendRe direct("de letespace. jsp?id="+r s2.getStri ng("Id")); %>"></inpu t>
</td>
<%}
rs2=statement.executeQuery ("SELECT * FROM bannerspace where WPID="+num);
while(rs2.next())
{
%>
<td class="zname"><b><%=rs2.ge tString("c pc")%></b> </td>
<td class="size"><%=rs2.getStr ing("Money Gained")%> <br/>Inlin e</td>
<td class="approve">Yes</td>
<td class="clicks"><%=rs2.getS tring("Num berOfClick s")%></td>
<td><input type="button" onclick="<%response.sendRe direct("de letespace. jsp?id="+r s2.getStri ng("Id")); %>"></inpu t>
</td>
<%
}
%>
</tr>
<%
}
%>
<br/>
<tr><td colspan="11" class="new_zone bottom"><a href="websiteinfo.jsp" class="add">Set up a new ad space</a></td>
</tr>
<br/>
</tbody>
</table><!-- www002 -->
</div>
</form>
<%
connection.close();
%>
WARNING: StandardWrapperValve[jsp]:
java.sql.SQLException: Operation not allowed after ResultSet closed
i have tryed every thing :(
</tr>
<%
Class.forName("com.mysql.j
connection = DriverManager.getConnectio
statement = connection.createStatement
int num=0;
rs = statement.executeQuery("SE
while (rs.next()) {
%>
<tr class="odd" >
<%
out.print(rs.getString("id
num=Integer.parseInt(rs.ge
rs2 = statement.executeQuery("SE
while (rs2.next())
{
%>
<td class="zname"><b><%=rs2.ge
<td class="size"><%=rs2.getStr
<td class="approve">Yes</td>
<td class="clicks"><%=rs2.getS
<td><input type="button" onclick="<%response.sendRe
</td>
<%}
rs2=statement.executeQuery
while(rs2.next())
{
%>
<td class="zname"><b><%=rs2.ge
<td class="size"><%=rs2.getStr
<td class="approve">Yes</td>
<td class="clicks"><%=rs2.getS
<td><input type="button" onclick="<%response.sendRe
</td>
<%
}
%>
</tr>
<%
}
%>
<br/>
<tr><td colspan="11" class="new_zone bottom"><a href="websiteinfo.jsp" class="add">Set up a new ad space</a></td>
</tr>
<br/>
</tbody>
</table><!-- www002 -->
</div>
</form>
<%
connection.close();
%>
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
add a checkbox with the row id as its value
ask a new question if you need help getting it to work
ask a new question if you need help getting it to work
ASKER
but if i want to add a check box to each row for delete ...how can i do that ?