Microsoft JET Database Engine error '80040e14' 问题急!!!!!!!!!!!!!

hrbww911 2008-11-22 05:40:58
代码如下:

<%
dim ComeUrl,cUrl,AdminName

ComeUrl=lcase(trim(request.ServerVariables("HTTP_REFERER")))
if ComeUrl="" then
response.write "<br><p align=center><font color='red'>对不起,为了系统安全,不允许直接输入地址访问本系统的后台管理页面。</font></p>"
response.end
else
cUrl=trim("http://" & Request.ServerVariables("SERVER_NAME"))
if mid(ComeUrl,len(cUrl)+1,1)=":" then
cUrl=cUrl & ":" & Request.ServerVariables("SERVER_PORT")
end if
cUrl=lcase(cUrl & request.ServerVariables("SCRIPT_NAME"))
end if

AdminName=replace(session("AdminName"),"'","")
if AdminName="" then
call CloseConn()
response.redirect "login.asp"
response.End()
end if
sql="select UserName from Admin where UserName='" & session("AdminName") & "' and Password='" & session("AdminPassword") & "'"
set rs=conn.execute(sql)        这就是报错的31行
if rs.eof and rs.bof then
rs.close
response.Redirect("login.asp")
response.End()
end if
Function uname(id)
strSQL = "select username from user where UserID="&id
set rsx = conn.execute(strSQL)
uname=rsx("username")
set rsx = nothing
end Function
Function ckbuy(id)
if id=1 then
ckbuy="客户出售"
else
ckbuy="客户购买"
end if
end Function
%>
原本什么问题也没有,可换了服务器以后就报错说
Microsoft JET Database Engine error '80040e14'

Syntax error in FROM clause.

/admin/admin.asp, line 31 我该怎么解决啊
...全文
211 7 打赏 收藏 转发到动态 举报
写回复
用AI写文章
7 条回复
切换为时间正序
请发表友善的回复…
发表回复
hrbww911 2008-11-22
  • 打赏
  • 举报
回复
<%
dim conn
dim connstr
dim db
db="../databases/WEBGM2_0.mdb" '数据库文件位置
on error resume next
connstr="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath(db)
response.write connstr
set conn=server.createobject("ADODB.CONNECTION")
sy_binbin 2008-11-22
  • 打赏
  • 举报
回复
你试试呗
要还是不好用就把你的CONN.ASP的代码贴一下看看
hrbww911 2008-11-22
  • 打赏
  • 举报
回复
可是password在这个网站的其他地方也没出问题啊
sy_binbin 2008-11-22
  • 打赏
  • 举报
回复
sql="select UserName from Admin where UserName='" & session("AdminName") & "' and [Password]='" & session("AdminPassword") & "'"

Password是关键字
hrbww911 2008-11-22
  • 打赏
  • 举报
回复
select UserName from Admin where UserName='admin' and Password='7a57a5a743894a0e'


sql打印出来是这样的
sy_binbin 2008-11-22
  • 打赏
  • 举报
回复
sql="select UserName from Admin where UserName='" & session("AdminName") & "' and Password='" & session("AdminPassword") & "'"

response.write sql
response.end

打印一下看看SQL语句是啥
sy_binbin 2008-11-22
  • 打赏
  • 举报
回复
数据库连接代码呢

28,391

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧