各位帅哥靓女,求助,急!!!!!!!!!
代码如下:
<%
UserName=Trim(Request.form("username"))
UserPwd=Trim(Request.form("password"))
Dim conn,rst,dbpath,strsql
set conn=Server.CreateObject("ADODB.Connection")
dbpath=Server.MapPath("logon.mdb")
conn.Open "Driver={Microsoft Access Driver (*.mdb)};DBQ="&dbpath
if conn.State=1 then
set rst=Server.CreateObject("ADODB.Recordset")
strsql="Select * from asptest where username='"&UserName&"' and password='"&UserPwd&"'"
rst.Open strsql,conn,3
if rst.RecordCount=0 then
response.Redirect("logonerror.asp")
else
Session("UserName")=rst.Fields("UserName")
Session("UserPwd")=rst.Fields("UserPwd")
response.Redirect("logonsuccess.asp")
end if
%>
<%
conn.close
set conn=nothing
end if
%>
显示错误如下
错误类型:
Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[Microsoft][ODBC Microsoft Access Driver]常见错误 不能打开注册表关键字 'Temporary (volatile) Jet DSN for process 0x7f8 Thread 0xcf0 DBC 0x1f42024 Jet'。
/diliuzhang/logon.asp, 第 16 行
浏览器类型:
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)
网页:
GET /diliuzhang/logon.asp