ADODB.Connection (0x800A0E7A)
未找到提供程序。该程序可能未正确安装。
/example/asp/logon.asp, 第 6 行
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; .NET CLR 2.0.50727)
代码是:
<%
Name=Request.Form("Name")
Password=Request.Form("Password")
db="asptest.mdb"
Set conn=Server.CreateObject("ADODB.Connection")
conn.open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath(db)
Set rst=Server.CreateObject("ADODB.Recordset")
strSQL ="Select * from UseraLogon Where Name='"&Name&"' AND Password='"&Password&"'"
rst.open strSQL, conn,3
if rst.RecordCount=0 then
%>
<script language=vbscript>
msgbox("用户名或密码不正确!",48)
window.history.go(-1)
</script>
<%
else
Session("Name")=rst("Name")
Session("UserID")=rst("ID")
%>
<script language=vbscrit>
msgbox("用户登录成功!",48)
window.location="index.asp"
</script>
<%end if
conn.Close
set conn=nothing
%>