登录页面出错了.请大家指教.
技术信息(用于支持人员)错误类型:
Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[Microsoft][ODBC Microsoft Access Driver]常见错误 不能打开注册表关键字 'Temporary (volatile) Jet DSN for process 0x624 Thread 0xb94 DBC 0x3420064 Jet'。
/on/login.asp, 第 14 行
浏览器类型:
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; QQDownload 1.7)
网页:
POST 45 ??? /on/login.asp
POST Data:
name=admin&password=admin&Submit=%B5%C7%C2%BC
时间:
2008年8月24日, 23:43:52
详细信息:
Microsoft 支持
这里是那里出错了.
我在制作登录页面出这种问题了.
请大侠们指教一下.(新手问题)
代码如下:
<%@LANGUAGE="VBSCRIPT"%>
<!--#include file="Connections/web.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="admin.asp"
MM_redirectLoginFailed="sb.asp"
MM_flag="ADODB.Recordset"
set MM_rsUser = Server.CreateObject(MM_flag)
MM_rsUser.ActiveConnection = MM_web_STRING
MM_rsUser.Source = "SELECT name, pass_word"
If MM_fldUserAuthorization <> "" Then MM_rsUser.Source = MM_rsUser.Source & "," & MM_fldUserAuthorization
MM_rsUser.Source = MM_rsUser.Source & " FROM name WHERE name='" & Replace(MM_valUsername,"'","''") &"' AND pass_word='" & 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 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/html; charset=gb2312" />
<title>无标题文档</title>
<style type="text/css">
<!--
.STYLE1 {
font-size: 36px;
color: #66FF99;
}
.STYLE2 {font-size: 14px}
-->
</style>
</head>
<body>
<div align="center">
<p>网站后台管理</p>
<form ACTION="<%=MM_LoginAction%>" METHOD="POST" id="form1" name="form1">
<label>用户名:
<input name="name" type="text" id="name" />
</label>
<p>
<label>密 码:
<input name="password" type="password" id="password" />
</label>
</p>
<p>
<label>
<input type="submit" name="Submit" value="登录" />
</label>
</p>
</form>
<p> </p>
</div>
</body>
</html>
祝你好运咯! [quote][bo][un]xiaomengyzy[/un] 在 2008-8-26 17:36 的发言:[/bo]
我也碰到过,是这样解决的:打开c:\windows\ 找到temp ,右键->安全与共享->安全->添加->高级->查找,选择everyone,确定,赋予写入权限。确定。ok!
祝你好运咯! [/quote]
谢谢了.在本机里是打开了.可上传到空间就不行了.有什么办法可以解决.
楼下如懂帮个忙. [quote][bo][un]fzying[/un] 在 2008-8-26 22:50 的发言:[/bo]
谢谢了.在本机里是打开了.可上传到空间就不行了.有什么办法可以解决.
楼下如懂帮个忙. [/quote]
更换数据库连接字符串 好像不行啊.
我不会用代码写的.只能用设计示图来做"数据库连接字符串"
楼上能不能给个代我试试.
或说得清楚点谢了. ConStr="Provider=Microsoft.Jet.OLEDB.4.0;Data Source="&Server.MapPath([mdb文件的URL地址])&";Persist Security Info=False"
'数据库连接方法代码
Set con=Server.CreateObject("ADODB.Connection")
con.Open ConStr 郁闷.用代码不行.能不能用设计示图来做连接呢? 怕是不行吧,连接数据库好像一定要代码!也不太清楚。斑竹是个好心人,你问他!呵呵 [quote][bo][un]fzying[/un] 在 2008-8-27 00:14 的发言:[/bo]
郁闷.用代码不行.能不能用设计示图来做连接呢? [/quote]
本人都是手写代码从不用Dreamweaver生成代码 "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("/date/mdb.mdb")--date表示站点下的一个子文件夹,mdb.mdb表示数据库.
这代码是在DW里用"自定义连接字符串"来连接的........还要在那选使用服务器什么的....具体的我不记得了.... 手写代码。不要用那个“应用程序” 生成代码,出错了不好找也不好改。。。。
页:
[1]

