什么问题导致“BOF 或 EOF 中有一个是“真”,或者当前的记录已被删除”
<!--#include file="config.asp"--><%
if not session("isadmin")=true then
response.redirect "login.asp"
end if
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"[url=http://www.]http://www.[/url]">
<html>
<head>
<meta http-equiv="Content-Type" c>
<title>查询结果</title>
<link href="css.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
body {
background-image: url(images/bg.jpg);
}
-->
</style></head>
<body>
<table width="1000" height="600" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="30%" height="30" valign="middle"> </td>
<td rowspan="2" valign="middle"><table width="540" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td> </td>
</tr>
</table> <table width="540" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td><img src="images/adminright_r1_c1.gif" width="540" height="45"></td>
</tr>
</table> <table width="540" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td background="images/adminright_r2_c1.gif">
<%
name=request.form("name")
userid=request.form("userid")
phone=request.form("phone")
if name="" and userid="" and phone="" then
Response.Write("<script>alert(""错误:\n请填写完整查询信息!"&Copyright&""");location.href=""admin.asp"";</script>")
end if
exec="select * from form where name='"+name+"' or userid='"+userid+"' or phone='"+phone+"'"
set rs=server.createobject("adodb.recordset")
rs.open exec,conn,1,1
if rs.EOF and rs.Bof then
Response.Write("<script>alert(""错误:\n无此数据信息,请重新查询!"&Copyright&""");location.href=""admin.asp"";</script>")
else
end if
'-------------------------
rs.pagesize=5
tatalrecord=rs.recordcount
tatalpages=rs.pagecount
rs.movefirst
'--------------------------
nowpage=request("page")
'--------------------------
if nowpage&"x"="x" then
nowpage=1
else
nowpage=cint(nowpage)
end if
'-------------------------
rs.absolutepage=nowpage
%>
<%
execid="select count(id) from form"
set rsid=server.createobject("adodb.recordset")
rsid.open execid,conn,1,1
%>
<table width="530" height="25" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td> </td>
</tr>
</table>
<table width="530" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="100" align="center"><img src="images/buttom9.gif" width="50" height="50"></td>
<td>查询信息结果如下:</td>
</tr>
</table>
<table width="530" border="1" align="center" bordercolor="#FFFFFF">
<%
n=1
while not rs.eof and n<=rs.pagesize
%>
<tr>
<td width="35%" height="30" bordercolor="#A4A4D9"> 姓名:<%=rs("name")%></td>
<td bordercolor="#A4A4D9"> 电话:<%=rs("tel")%></td>
<td bordercolor="#A4A4D9"> 手机:<%=rs("phone")%></td>
</tr>
<tr>
<td height="30" bordercolor="#A4A4D9"> 会员号:<%=rs("userid")%></td>
<td bordercolor="#A4A4D9"> 邮编:</td>
<td bordercolor="#A4A4D9"> 系统编号:<%=rs("id")%></td>
</tr>
<tr>
<td height="40" colspan="3" bordercolor="#A4A4D9"> 联系地址:<%=rs("address")%></td>
</tr>
<tr>
<td height="50" colspan="3" bordercolor="#A4A4D9"> </td>
</tr>
<tr>
<td height="40" colspan="3"><table width="500" height="30" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="5%" align="right" valign="middle"><img src="images/buttom5.gif" width="15" height="15"></td>
<td width="50%" valign="middle"> 用户提交时间:<%=rs("time")%></td>
<td width="5%" align="right" valign="middle"><img src="images/buttom6.gif" width="15" height="15"></td>
<td width="40%">
<div style="padding-top:1px;">
<form name="form1" method="post" action="delete.asp">
<input name="id" type="hidden" value="<%=rs("id")%>">
<input name="Submit" type="image" value="删除" src="images/delete.gif" alt="删除以上用户的信息">
</form></div> </td>
</tr>
</table></td>
</tr>
<%
n=n+1
rs.movenext
wend
%>