下面的代码我在预览时提示:Microsoft VBScript 编译器错误 (0x800A0401)
语句未结束
/example/asp/logon.asp, line 8, column 49
strSQL ="Select* from UseraLogon Where Name="&"'"Name""&" AND Password="&"'"Password"'"
要怎么改啊!
<%
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
%>