我用DW 8设计做了一个登陆界面,可是我做好预览的时候出现:
MicrosoftOLEDBProviderforODBCDrivers错误'80004005'[Microsoft][ODBCMicrosoftAccessDriver...
Microsoft OLE DB Provider for ODBC Drivers 错误 '80004005'
[Microsoft][ODBC Microsoft Access Driver] Microsoft Jet 数据库引擎打不开文件'(未知的)'。 它已经被别的用户以独占方式打开,或没有查看数据的权限。
/index.asp,行 8
代码是这样的:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="Connections/KK.asp" -->
<%
Dim Recordset1
Dim Recordset1_numRows
Set Recordset1 = Server.CreateObject("ADODB.Recordset")
Recordset1.ActiveConnection = MM_KK_STRING
Recordset1.Source = "SELECT * FROM admin"
Recordset1.CursorType = 0
Recordset1.CursorLocation = 2
Recordset1.LockType = 1
Recordset1.Open()
Recordset1_numRows = 0
%>
<%
' *** 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("textfield"))
If MM_valUsername <> "" Then
MM_fldUserAuthorization=""
MM_redirectLoginSuccess="index11.asp"
MM_redirectLoginFailed="#"
MM_flag="ADODB.Recordset"
set MM_rsUser = Server.CreateObject(MM_flag)
MM_rsUser.ActiveConnection = MM_KK_STRING
MM_rsUser.Source = "SELECT user, pass"
If MM_fldUserAuthorization <> "" Then MM_rsUser.Source = MM_rsUser.Source & "," & MM_fldUserAuthorization
MM_rsUser.Source = MM_rsUser.Source & " FROM admin WHERE user='" & Replace(MM_valUsername,"'","''") &"' AND pass='" & Replace(Request.Form("textfield"),"'","''") & "'"
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>
<meta http-equiv="Refresh" content="3;URL=index.asp" />
</head>
<body>
<table width="100%" height="265" border="0" cellpadding="0" cellspacing="0">
<tr>
可是你们说的我都在网上找过了,都弄好了。可是还是这样的问题。。。怎么办啊,我打开学习的(就是网上下下来用来给新手学的)网页却又能打开呢。求解~ 展开
[Microsoft][ODBC Microsoft Access Driver] Microsoft Jet 数据库引擎打不开文件'(未知的)'。 它已经被别的用户以独占方式打开,或没有查看数据的权限。
/index.asp,行 8
代码是这样的:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="Connections/KK.asp" -->
<%
Dim Recordset1
Dim Recordset1_numRows
Set Recordset1 = Server.CreateObject("ADODB.Recordset")
Recordset1.ActiveConnection = MM_KK_STRING
Recordset1.Source = "SELECT * FROM admin"
Recordset1.CursorType = 0
Recordset1.CursorLocation = 2
Recordset1.LockType = 1
Recordset1.Open()
Recordset1_numRows = 0
%>
<%
' *** 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("textfield"))
If MM_valUsername <> "" Then
MM_fldUserAuthorization=""
MM_redirectLoginSuccess="index11.asp"
MM_redirectLoginFailed="#"
MM_flag="ADODB.Recordset"
set MM_rsUser = Server.CreateObject(MM_flag)
MM_rsUser.ActiveConnection = MM_KK_STRING
MM_rsUser.Source = "SELECT user, pass"
If MM_fldUserAuthorization <> "" Then MM_rsUser.Source = MM_rsUser.Source & "," & MM_fldUserAuthorization
MM_rsUser.Source = MM_rsUser.Source & " FROM admin WHERE user='" & Replace(MM_valUsername,"'","''") &"' AND pass='" & Replace(Request.Form("textfield"),"'","''") & "'"
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>
<meta http-equiv="Refresh" content="3;URL=index.asp" />
</head>
<body>
<table width="100%" height="265" border="0" cellpadding="0" cellspacing="0">
<tr>
可是你们说的我都在网上找过了,都弄好了。可是还是这样的问题。。。怎么办啊,我打开学习的(就是网上下下来用来给新手学的)网页却又能打开呢。求解~ 展开
3个回答
展开全部
1.取消简单共享
2.添加权限,添加user_用户名,给他完全控制的权限,或者写入与修改的权限
3.简单的,先保存好,把DW关一下,然后重开DW就可以预览,因为你开了一次再修改,但是你数据库不允许修改,你再次打开如果要修改数据库文件内容但是没有权限,就出现无法打开的现象。
抱歉,没看数据,只是根据经验说一下,你参考一下。
2.添加权限,添加user_用户名,给他完全控制的权限,或者写入与修改的权限
3.简单的,先保存好,把DW关一下,然后重开DW就可以预览,因为你开了一次再修改,但是你数据库不允许修改,你再次打开如果要修改数据库文件内容但是没有权限,就出现无法打开的现象。
抱歉,没看数据,只是根据经验说一下,你参考一下。
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
1、把Access 关闭(它已经被别的用户以独占方式打开)
2、添加权限(文件夹-右键-“共享安全”-添加“internet来宾账户”-并授权)。
2、添加权限(文件夹-右键-“共享安全”-添加“internet来宾账户”-并授权)。
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
value=
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询