ADODB.Field (0x80020009) BOF 或 EOF 中有一个是“真”,或者当前的记录已被删除
代码在家和我朋友的电脑上运行都没有问题,但是一到我公司的电脑上就运行不了了。登陆的时候账号和密码对的话就没问题,是如果是错的话就出现如下的问题
错误类型:
ADODB.Field (0x80020009)
BOF 或 EOF 中有一个是“真”,或者当前的记录已被删除,所需的操作要求一个当前的记录。
/inc/sava.asp, 第 19 行
<!-- #include file ="conn.asp" -->
<!--#include file="md5.asp"-->
<%
dim sql
dim rs
dim ygname
dim ygpassword
ygname=trim(request.Form("ygname"))
ygpassword1=trim(Request.Form("ygpassword"))
ygpassword2=md5(ygpassword1)
if ygname<>"" and ygpassword1<>"" then
set rs=server.createobject("adodb.recordset")
sql="select * from yg where ygname='"&ygname&"' and ygpassword='"&ygpassword2&"'"
rs.open sql,conn,1,1
if rs.bof and rs.eof then
response.Write"<script language='javascript'>alert('对不起,你的用户名或密码不正确,请重新输入!');history.go(-1);</script>"
end if
session("ygname")=rs("ygname")
session("qx")=rs("qx")
Response.Redirect "../feedback.asp"
rs.close
conn.close
set rs=nothing
set conn=nothing
else
response.Write"<script language='javascript'>alert('对不起,你的用户名或密码为空,请重新输入!');history.go(-1);</script>"
end if
%>