标题:[求助]我用DEARMWAVER做的登陆网页有问题,请大侠帮忙
只看楼主
mahu981
Rank: 1
等 级:新手上路
帖 子:3
专家分:0
注 册:2005-4-15
 问题点数:0 回复次数:1 
[求助]我用DEARMWAVER做的登陆网页有问题,请大侠帮忙
我用DEARMWAVER做的登陆网页有问题,请大侠帮忙
代码如下 <%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%> <!--#include file="Connections/bb1.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("ID")) If MM_valUsername <> "" Then MM_fldUserAuthorization="" MM_redirectLoginSuccess="index.asp" MM_redirectLoginFailed="001.asp" MM_flag="ADODB.Recordset" set MM_rsUser = Server.CreateObject(MM_flag) MM_rsUser.ActiveConnection = MM_bb1_STRING MM_rsUser.Source = "SELECT ID, password" If MM_fldUserAuthorization <> "" Then MM_rsUser.Source = MM_rsUser.Source & "," & MM_fldUserAuthorization MM_rsUser.Source = MM_rsUser.Source & " FROM user WHERE ID='" & Replace(MM_valUsername,"'","''") &"' AND password='" & Replace(Request.Form("password"),"'","''") & "'" MM_rsUser.CursorType = 0 MM_rsUser.CursorLocation = 2 MM_rsUser.LockType = 3 MM_rsUser.Open 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>无标题文档</title> </head> <body> <form name="form1" method="POST" action="<%=MM_LoginAction%>"> <table width="741"> <tr> <td>用户名</td> <td><input name="ID" type="text" id="ID"></td> <td>密码</td> <td><input name="password" type="text" id="password"></td> </tr> </table> <p>                     <input type="submit" name="Submit" value="登陆">       <input type="reset" name="Submit" value="取消"> </p> </form> </body> </html> bb1.asp的代码是 <% ' FileName="Connection_ado_conn_string.htm" ' Type="ADO" ' DesigntimeType="ADO" ' HTTP="false" ' Catalog="" ' Schema="" Dim MM_bb1_STRING MM_bb1_STRING = "Driver={Microsoft Access Driver (*.mdb)};DBQ=d:\飞天无限\data.mdb" %> 打开页面可以,但填上用户名点登陆就出错了 错误如下 错误类型: Microsoft OLE DB Provider for ODBC Drivers (0x80004005) [Microsoft][ODBC Microsoft Access Driver]常见错误 不能打开注册表关键字 'Temporary (volatile) Jet DSN for process 0xcbc Thread 0xddc DBC 0x11f0024 Jet'。 /003.asp, 第 14 行 请帮忙解决,不盛感激
搜索更多相关主题的帖子: 网页 DEARMWAVER 登陆 
2005-04-15 20:29
hxfly
Rank: 5Rank: 5
等 级:贵宾
威 望:17
帖 子:5807
专家分:108
注 册:2005-4-7
得分:0 
最好不要用汉字做路径
最好不要用绝对路径

2005-04-16 06:13



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-15762-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.051206 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved