我是个新手请各位高手帮看一下,做一个论坛提交的时候显示
<%dim sql,rs,news_id
news_id=request.QueryString("news_id")
sql="select * from news where news_id='"&news_id&"'"
Set rs=Server.CreateObject("ADODB.recordset")
rs.Open sql,conn,1,1 %>
<tr>
<td height="13"> <%=rs("news_content")%></td>
</tr>
<% rs.close
set rs=nothing
%>
</table>
</td>
</tr>
</table></td>
</tr>
<tr> </tr>
</table>
<table width="768" border="0" height="100" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
<%
sql="select * from huifu where news_id='"&news_id&"'"
Set rs=Server.CreateObject("ADODB.recordset")
rs.Open sql,conn,1,1 %>
<% if not rs.eof and not rs.bof then
dim p_no
if Request.QueryString("p_no")="" then
p_no=1
else
p_no=cint(Request.QueryString("p_no"))
end if
rs.pagesize=3
rs.absolutepage=p_no
p=rs.pagesize
do while not rs.eof and p>0
%>
<tr>
已回复 <td><%=rs("huifu")%></td>
</tr>
<%
p=p-1
rs.movenext
loop
%>
</table>
<%'===================== 分页导航条 =============================
Response.Write "请选择: "
if p_no=1 then
Response.Write "第一页 "
Response.Write "上一页 "
else
Response.Write "<a href=newscontent.asp>第一页</a> "
Response.Write "<a href=newscontent.asp?p_no="&p_no-1&">上一页</a> "
end if
if p_no=rs.pagecount then
Response.Write "下一页 "
Response.Write "最后一页</a>"
else
Response.Write "<a href=newscontent.asp>第一页</a> "
Response.Write "<a href=newscontent.asp?p_no="&p_no-1&">上一页</a> "
end if
else
Response.Write "没有相关记录!"
end if %>
<%rs.close
set rs=nothing
%>
<table width="768" border="0" height="150" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
<tr>
<td><form id="form1" name="form1" method="post" action="newscontent.asp?active=ture">
<label>
<textarea name="content" id="content" cols="105" rows="10"></textarea>
</label>
<div align="center">
<label>
<input type="submit" name="button" id="button" value="回复" />
<input type="submit" name="button2" id="button2" value="修改" />
</label>
</div>
</form>
</td>
</tr>
</table>
<%
sql="insert into huifu (huifu) values('" &huifu& "')"
conn.execute(sql)
conn.close
set conn=nothing
%>
</td>
</tr>
<tr>
<td><img src="images/di.gif" width="768" height="50" /></td>
</tr>
</table>
</body>
</html>
我提交表单时显示:BOF 或 EOF 中有一个是“真”,或者当前的记录已被删除,所需的操作要求一个当前的记录