2、然后在输入框中输入“%windir%\system32\inetsrv\InetMgr.exe”后点击“下一步”至最后看是否可行。
输入“%windir%\system32\inetsrv\InetMgr.exe”
一个ASP的登陆页面 为什么一遇到数据库的问题就出错,谢谢!<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/htmlcharset=gb2312" />
<title>登录</title>
</head>
<body>
<div align="center">
<%
dim strUserName
dim strPassword
dim conn
dim rs
dim sql
strUserName=Request.Form("Username")
strPassword=request.Form("code")
if strUserName="" then
response.Redirect"Login.html"
end if
if strPassword="" then
response.Redirect"Login.html"
end if
set conn=server.createobject("adodb.connection")
conn.open "driver={microsoft access driver (*.mdb,*.accdb)}dbq="&server.mappath("User.accdb")
sql="select User_name from Users where(User_name="&strUserName&" and User_password="&strPassword&")"
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,1
if not rs.eof then
session("Username")=strUserName
response.Write("登陆成功!")
else
response.Write("登录失败!")
end if
set rs=nothing
conn.close
set conn=nothing
%>
</div>
</body>
</html>
第二试一下response.write server.mappath("User.accdb")
看看是否报错
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)