小弟不解,還請高手指點!!! |
|
dind
更新時間:2004/12/15 下午 11:12:44 |
|
Microsoft VBScript 編譯器錯誤 錯誤 '800a03f6' 缺少 'End' /iisHelp/common/500-100.asp,行242 Microsoft JET Database Engine 錯誤 '80040e14' FROM 子句語法錯誤。 /cao/index.asp,行21
不知道為什麼,我在用ASP編寫登錄頁時出現以上的錯誤!誰能幫幫我啊! A)我是用”自定義連接字串”:"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("/cao/yungong.mdb")測試成功的!我想應該不是這裏出錯吧??? B)我的根源程式如下: <%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%> <!--#include file="Connections/connRen.asp" --> <% ' *** Validate request to log in to this site. MM_LoginAction = Request.ServerVariables("URL") If Request.QueryString<>"" Then MM_LoginAction = MM_LoginAction + "?" + Server.HTMLEncode(Request.QueryString) MM_valUsername=CStr(Request.Form("name")) If MM_valUsername <> "" Then MM_fldUserAuthorization="" MM_redirectLoginSuccess="show.asp" MM_redirectLoginFailed="error.asp" MM_flag="ADODB.Recordset" set MM_rsUser = Server.CreateObject(MM_flag) MM_rsUser.ActiveConnection = MM_connRen_STRING MM_rsUser.Source = "SELECT name, passwd" If MM_fldUserAuthorization <> "" Then MM_rsUser.Source = MM_rsUser.Source & "," & MM_fldUserAuthorization MM_rsUser.Source = MM_rsUser.Source & " FROM user WHERE name='" & Replace(MM_valUsername,"'","''") &"' AND passwd='" & Replace(Request.Form("passwd"),"'","''") & "'" MM_rsUser.CursorType = 0 MM_rsUser.CursorLocation = 2 MM_rsUser.LockType = 3 MM_rsUser.Open ‘這裏就是第21行,也是出錯的地方!小弟不解,還請高手指點!!! If Not MM_rsUser.EOF Or Not MM_rsUser.BOF Then ' username and password match - this is a valid user Session("MM_Username") = MM_valUsername If (MM_fldUserAuthorization <> "") Then Session("MM_UserAuthorization") = CStr(MM_rsUser.Fields.Item(MM_fldUserAuthorization).Value) Else Session("MM_UserAuthorization") = "" End If if CStr(Request.QueryString("accessdenied")) <> "" And false Then MM_redirectLoginSuccess = Request.QueryString("accessdenied") End If MM_rsUser.Close Response.Redirect(MM_redirectLoginSuccess) End If MM_rsUser.Close Response.Redirect(MM_redirectLoginFailed) End If %> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312"> <title>login</title> <link href="a.css" rel="stylesheet" type="text/css"> </head>
<body> <h1 align="center" class="style1"> </h1> <h1 align="center" class="style1">登錄系統</h1> <hr width="80%"> <form action="<%=MM_LoginAction%>" method="POST" enctype="application/x-www-form-urlencoded" name="form1" target="_top"> <table width="23%" border="0" align="center"> <tr> <td width="44%" height="18">管理者姓名:</td> <td width="56%"><input name="name" type="text" id="name" size="8"></td> </tr> <tr> <td height="18">管理者密碼:</td> <td><input name="passwd" type="password" id="passwd" size="8"></td> </tr> </table> <div align="center"> <input type="submit" name="Submit" value="進入系統"> </div> </form> <hr width="80%"> </body> </html> 小弟不解,還請高手指點!!!
|
|
|
|
dind
更新時間:2004/12/15 下午 11:51:05 |
|
还有一个问题就是我这个登录页出错了,但是若我搞个记录show的页面就会成功,一切正常,每一条记录都可以出现 !那到底哪里出错了呢???还请老师指点!!! |
|
|
|
文淵閣工作室
更新時間:2004/12/16 下午 02:47:47 |
|
您可以將您的作品壓縮整個資料夾寄到我們的信箱,說明好您的問題。 |
|
|
|
|
|
|