主题:求助,在线等
[color=FF0000][b]实在不好意思,一着急忘写问题了。这是一个后台登陆的页,以前没有问题,今天才出现的问题,我把备份的这个页覆盖了,把数据库覆盖了,都不行。为什么会出这样的问题?
ADODB.Recordset 错误 '800a0cc1'
在对应所需名称或序数的集合中,未找到项目。
/admin/admin_login.asp,行 36 [/b][/color]
<!--#include file = admin_conn.asp -->
<!--#include file = md5.asp -->
<html>
<head>
<!--#include file = language.asp -->
<!--#include file = titleb.asp -->
<title>网站后台登录</title>
</head>
<body>
<%
userip = Request.ServerVariables("HTTP_X_FORWARDED_FOR")
If userip = "" Then userip = Request.ServerVariables("REMOTE_ADDR")
Function finddir(filepath)
finddir=""
for i=1 to len(filepath)
if left(right(filepath,i),1)="/" or left(right(filepath,i),1)="\" then
abc=i
exit for
end if
next
if abc <> 1 then
finddir=left(filepath,len(filepath)-abc+1)
end if
end Function
'xuasurl=finddir(request.servervariables("URL"))
'Set rs = Server.CreateObject("ADODB.RecordSet")
'rs.Open "select * from [config]",conn,1,3
'if rs.recordcount=0 then
' rs.addnew
'end if
[color=FF00FF][b] rs("path")=xuasurl[/b][/color] 这是出错的行。
rs.update
rs.close
set rs=nothing
xuasyzm=trim(request("xuasyzm"))
if xuasyzm="" then
Response.Redirect "sdtex_login.asp?id=3"
end if
xuasyzm=int(xuasyzm)
if xuasyzm<>session("xuasyzm") then
Response.Redirect "sdtex_login.asp?id=3"
end if
session("xuasyzm")=""
if request("user")="" or request("pass")="" then
conn.close
set conn=nothing
Response.Redirect "sdtex_login.asp?id=0"
else
user=LCase(chkhtm(request("user")))
pass=md5(chkhtm(trim(request("pass"))))
sql = "select * from admin where username='"&user&"' and [pass]='"&pass&"'"
Set rs = Server.CreateObject("ADODB.RecordSet")
rs.Open sql,conn,1,1
if rs.recordcount=0 then
blog=user&"登录系统后台失败。IP是:"&userip&"。"
addtime=now()
conn.Execute "insert into [blog] ([content],[addtime]) values('"&blog&"','"&addtime&"')"
conn.close
set conn=nothing
Response.Redirect "sdtex_login.asp?id=1"
end if
session("admin__user")=rs("user")
session("xtgg")=rs("xtgg")
session("admin__pass")=pass
session("dj")=rs("dj")
session("dlname")=rs("username")
Response.Cookies ("adminuser")=rs("username")
Response.Cookies ("adminpass")=pass
Response.Cookies ("admindj")=rs("dj")
blog=rs("username")&"登录系统后台成功。IP是:"&userip&"。"
addtime=now()
conn.Execute "insert into [blog] ([content],[addtime]) values('"&blog&"','"&addtime&"')"
Response.Redirect "admin_index.asp"
end if
%>
</body>
</html>
<%
conn.close
set conn=nothing
%>
ADODB.Recordset 错误 '800a0cc1'
在对应所需名称或序数的集合中,未找到项目。
/admin/admin_login.asp,行 36 [/b][/color]
<!--#include file = admin_conn.asp -->
<!--#include file = md5.asp -->
<html>
<head>
<!--#include file = language.asp -->
<!--#include file = titleb.asp -->
<title>网站后台登录</title>
</head>
<body>
<%
userip = Request.ServerVariables("HTTP_X_FORWARDED_FOR")
If userip = "" Then userip = Request.ServerVariables("REMOTE_ADDR")
Function finddir(filepath)
finddir=""
for i=1 to len(filepath)
if left(right(filepath,i),1)="/" or left(right(filepath,i),1)="\" then
abc=i
exit for
end if
next
if abc <> 1 then
finddir=left(filepath,len(filepath)-abc+1)
end if
end Function
'xuasurl=finddir(request.servervariables("URL"))
'Set rs = Server.CreateObject("ADODB.RecordSet")
'rs.Open "select * from [config]",conn,1,3
'if rs.recordcount=0 then
' rs.addnew
'end if
[color=FF00FF][b] rs("path")=xuasurl[/b][/color] 这是出错的行。
rs.update
rs.close
set rs=nothing
xuasyzm=trim(request("xuasyzm"))
if xuasyzm="" then
Response.Redirect "sdtex_login.asp?id=3"
end if
xuasyzm=int(xuasyzm)
if xuasyzm<>session("xuasyzm") then
Response.Redirect "sdtex_login.asp?id=3"
end if
session("xuasyzm")=""
if request("user")="" or request("pass")="" then
conn.close
set conn=nothing
Response.Redirect "sdtex_login.asp?id=0"
else
user=LCase(chkhtm(request("user")))
pass=md5(chkhtm(trim(request("pass"))))
sql = "select * from admin where username='"&user&"' and [pass]='"&pass&"'"
Set rs = Server.CreateObject("ADODB.RecordSet")
rs.Open sql,conn,1,1
if rs.recordcount=0 then
blog=user&"登录系统后台失败。IP是:"&userip&"。"
addtime=now()
conn.Execute "insert into [blog] ([content],[addtime]) values('"&blog&"','"&addtime&"')"
conn.close
set conn=nothing
Response.Redirect "sdtex_login.asp?id=1"
end if
session("admin__user")=rs("user")
session("xtgg")=rs("xtgg")
session("admin__pass")=pass
session("dj")=rs("dj")
session("dlname")=rs("username")
Response.Cookies ("adminuser")=rs("username")
Response.Cookies ("adminpass")=pass
Response.Cookies ("admindj")=rs("dj")
blog=rs("username")&"登录系统后台成功。IP是:"&userip&"。"
addtime=now()
conn.Execute "insert into [blog] ([content],[addtime]) values('"&blog&"','"&addtime&"')"
Response.Redirect "admin_index.asp"
end if
%>
</body>
</html>
<%
conn.close
set conn=nothing
%>