ASP登录错误:错误类型:(0x80020009)发生意外

来源:百度知道 编辑:UC知道 时间:2024/07/07 03:55:55
错误类型:
(0x80020009)
发生意外。
/admin/login.asp, 第 13 行

<!-- #include file="setup.asp" -->
<!-- #include file="../Utility/MD5.asp" -->
<!-- #include file="../Wolib/function.asp" -->
<title>后台管理登陆</title>
<link href="css/style.css" rel="stylesheet" type="text/css" />
<%
if Request.ServerVariables("Request_method") = "POST" then
if SiteConfig("EnableAntiSpamTextGenerateForLogin")=1 then
if Request.Form("VerifyCode")<>Session("VerifyCode") or Session("VerifyCode")="" then call Wodig.MsgBox2("验证码错误!",1,"javascript:history.back();")
end if
if Request("pass")="" then call Wodig.MsgBox2("请输入管理员密码!",1,"javascript:history.back();")
session("pass")=md5(""&Request(&quo

if Conn.Execute("Select UserPass From [Wo_Users] where UserName='"&CookieUserName&"'")(0)<>session("pass") then 《就是这里出错误》
==========================================
改成这样试试:
if Conn.Execute("Select * From [Wo_Users] where UserName='"&CookieUserName&"'")(0)<>session("pass") then
=================================
很明显是SQL语句写错了
select userpass 只选择表中这一列,而你后面where username 又调用了username这一列.不出错才怪!~所以用*号.选取所有列

if Conn.Execute("Select UserPass From [Wo_Users] where UserName='"&CookieUserName&"'")(0)<>session("pass") then
改成:
if Conn.Execute("Select UserPass From [Wo_Users] where UserName='"&CookieUserName&"'")(0) then

根据我来看 好象楼主好象数错了 13行是if Request("pass")="" then call Wodig.MsgBox2("请输入管理员密码!",1,"javascript:history.back();")

IF语句 能和