网站后台登录出现错误

来源:百度知道 编辑:UC知道 时间:2024/05/22 09:09:29
我在本地测试时,登陆后台出现下面的错误:
Microsoft OLE DB Provider for ODBC Drivers (0x80040E10)
[Microsoft][ODBC Microsoft Access Driver] 参数不足,期待是 1。
/xm/admin/login.asp, 第 8 行

-----------------------------------------下面是代码
<%if Trim(request("dl"))="ok" then%>
<!--#include file="../include/OPENDATA1.INC"-->
<%Dim strSQL
'strSQL="ja_lo_login "&request("user")&","&request("password")
strSQL="select * from db_admin where us_user="&request("user")&" and us_kl="&request("password")
'Response.write strSQL
'Response.end
set rs=Conn.execute(strSQL)-------------------------------------第8行
if rs.bof and rs.eof then
response.write "<script language='javascript'>"
response.write "alert('用户名或密码有错误,请重新输入!');"
response.write"history.go(-1);"
re

strSQL="select * from db_admin where us_user="&request("user")&" and us_kl="&request("password") 这句有错误!原因:字段值没有引号;应该用单引号引起来!

改为:strSQL="select * from db_admin where us_user='"&request("user")&"' and us_kl='"&request("password")&"'"

cxzzadf