主题:jsp连接数据库结果集显示时一页只显示一个记录的方法(急)
怎样才能一页纸显示一组记录,按下“下一个记录”时显示下一个记录呢
谢谢!
<jsp:useBean id="dbconnect" class="DB.Dbconnect" scope="page"/>
<table width="60%" height="361" border="1" align="center" bgcolor="#CCFFFF">
<!--调用JavaBean来连接数据库-->
<%
ResultSet rs;
rs = dbconnect.executeQuery("select top 1 substring(mapvolume,2,len(mapvolume)-1),imagename,conclusion from diagnose,imagelink where diagnose.diagid=imagelink.diagid");
while(rs.next())
{
%>
<tr>
<td height="33">图像:</td>
</tr>
<tr>
<td height="159"><img name="photo" src="<%=request.getParameter("disk")%>\<%=rs.getString(1)%>\<%=rs.getString("imagename")%>" width="768" height="576" alt="图像"></td>
</tr>
<tr>
<td height="33">诊断结果:</td>
</tr>
<tr>
<td height="94"><%=rs.getString("conclusion")%></td>
</tr>
<%
}
%>
<tr>
<td height="28"><div align="center">
<input type="Button" name="Submit" value="下一个记录" >
</div></td>
</tr>
</table>
谢谢!
<jsp:useBean id="dbconnect" class="DB.Dbconnect" scope="page"/>
<table width="60%" height="361" border="1" align="center" bgcolor="#CCFFFF">
<!--调用JavaBean来连接数据库-->
<%
ResultSet rs;
rs = dbconnect.executeQuery("select top 1 substring(mapvolume,2,len(mapvolume)-1),imagename,conclusion from diagnose,imagelink where diagnose.diagid=imagelink.diagid");
while(rs.next())
{
%>
<tr>
<td height="33">图像:</td>
</tr>
<tr>
<td height="159"><img name="photo" src="<%=request.getParameter("disk")%>\<%=rs.getString(1)%>\<%=rs.getString("imagename")%>" width="768" height="576" alt="图像"></td>
</tr>
<tr>
<td height="33">诊断结果:</td>
</tr>
<tr>
<td height="94"><%=rs.getString("conclusion")%></td>
</tr>
<%
}
%>
<tr>
<td height="28"><div align="center">
<input type="Button" name="Submit" value="下一个记录" >
</div></td>
</tr>
</table>