前台asp,后台access数据库连接错误
前台asp,后台access,在前台asp'页面中查看access中的数据时出现下面的错误:
-------------
Microsoft VBScript 编译器错误 错误 '800a03f6'
缺少 'End'
/iisHelp/common/500-100.asp,行242
Microsoft OLE DB Provider for ODBC Drivers 错误 '80004005'
[Microsoft][ODBC Microsoft Access Driver]常见错误 不能打开注册表关键字 'Temporary (volatile) Jet DSN for process 0x868 Thread 0x8ec DBC 0x2b22c64 Jet'。
/conn1.asp,行6
----------
而在前台向access中插入数据时出现下面的错误
-------
Microsoft OLE DB Provider for ODBC Drivers 错误 '80004005'
[Microsoft][ODBC Microsoft Access Driver] 不能更新。数据库或对象为只读。
-----------
后台能直接打开access数据库,且能编辑,请教是什么错误,怎么改?
---conn1.asp
<%
'设置数据库链接
strConn = "Driver={Microsoft Access Driver (*.mdb)};DBQ=" & Server.MapPath("yjb.mdb")
session("strconn")=strConn
Set dbc = Server.CreateObject("ADODB.Connection")
dbc.open strConn
%>
问题点数:20、回复次数:8Top
1 楼lilu207(lilu)回复于 2004-09-04 09:43:57 得分 0
-------500-100.asp
<%@ language="VBScript" %>
<%
Option Explicit
Const lngMaxFormBytes = 200
Dim objASPError, blnErrorWritten, strServername, strServerIP, strRemoteIP
Dim strMethod, lngPos, datNow, strQueryString, strURL
If Response.Buffer Then
Response.Clear
Response.Status = "500 Internal Server Error"
Response.ContentType = "text/html"
Response.Expires = 0
End If
Set objASPError = Server.GetLastError
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<html dir=ltr>
<head>
<style>
a:link {font:9pt 宋体; color:FF0000}
a:visited {font:9pt 宋体; color:#4e4e4e}
</style>
<META NAME="ROBOTS" CONTENT="NOINDEX">
<title>本页无法显示</title>
<META HTTP-EQUIV="Content-Type" Content="text-html; charset=gb2312">
<META NAME="MS.LOCALE" CONTENT="ZH-CN">
</head>
<script>
function Homepage(){
<!--
// in real bits, urls get returned to our script like this:
// res://shdocvw.dll/http_404.htm#http://www.DocURL.com/bar.htm
//For testing use DocURL = "res://shdocvw.dll/http_404.htm#https://www.microsoft.com/bar.htm"
DocURL=document.URL;
//this is where the http or https will be, as found by searching for :// but skipping the res://
protocolIndex=DocURL.indexOf("://",4);
//this finds the ending slash for the domain server
serverIndex=DocURL.indexOf("/",protocolIndex + 3);
//for the href, we need a valid URL to the domain. We search for the # symbol to find the begining
//of the true URL, and add 1 to skip it - this is the BeginURL value. We use serverIndex as the end marker.
//urlresult=DocURL.substring(protocolIndex - 4,serverIndex);
BeginURL=DocURL.indexOf("#",1) + 1;
urlresult=DocURL.substring(BeginURL,serverIndex);
//for display, we need to skip after http://, and go to the next slash
displayresult=DocURL.substring(protocolIndex + 3 ,serverIndex);
InsertElementAnchor(urlresult, displayresult);
}
function HtmlEncode(text)
{
return text.replace(/&/g, '&').replace(/'/g, '"').replace(/</g, '<').replace(/>/g, '>');
}
function TagAttrib(name, value)
{
return ' '+name+'="'+HtmlEncode(value)+'"';
}
function PrintTag(tagName, needCloseTag, attrib, inner){
document.write( '<' + tagName + attrib + '>' + HtmlEncode(inner) );
if (needCloseTag) document.write( '</' + tagName +'>' );
}
function URI(href)
{
IEVer = window.navigator.appVersion;
IEVer = IEVer.substr( IEVer.indexOf('MSIE') + 5, 3 );
return (IEVer.charAt(1)=='.' && IEVer >= '5.5') ?
encodeURI(href) :
escape(href).replace(/%3A/g, ':').replace(/%3B/g, ';');
}
function InsertElementAnchor(href, text)
{
PrintTag('A', true, TagAttrib('HREF', URI(href)), text);
}
//-->
</script>
<body bgcolor="FFFFFF">
<table width="410" cellpadding="3" cellspacing="5">
<tr>
<td align="left" valign="middle" width="360">
<h1 style="COLOR:000000; FONT: 9pt 宋体"><!--Problem-->本页无法显示</h1>
</td>
</tr>
<tr>
<td width="400" colspan="2">
<font style="COLOR:000000; FONT: 9pt 宋体">试图访问的网页出现问题,无法显示。</font></td>
</tr>
<tr>
<td width="400" colspan="2">
<font style="COLOR:000000; FONT: 9pt 宋体">
<hr color="#C0C0C0" noshade>
<p>请尝试以下方法:</p>
<ul>
<li id="instructionsText1">单击
<a href="javascript:location.reload()">
刷新</a>按钮或者梢候再试。<br>
</li>
<li>打开
<script>
<!--
if (!((window.navigator.userAgent.indexOf("MSIE") > 0) && (window.navigator.appVersion.charAt(0) == "2")))
{
Homepage();
}
//-->
</script>
主页,然后查找与所需信息相关的链接。 </li>
</ul>
<h2 style="FONT: 9pt 宋体; color:000000">HTTP 500.100 - 内部服务器错误 - ASP 错误<br>
Internet 信息服务</h2>
<hr color="#C0C0C0" noshade>
<p>技术信息(适用于支持人员)</p>
<ul>
<li>错误类型:<br>
<%
Dim bakCodepage
bakCodepage = Session.Codepage
Session.Codepage = 936
Response.Write Server.HTMLEncode(objASPError.Category)
If objASPError.ASPCode > "" Then Response.Write Server.HTMLEncode(", " & objASPError.ASPCode)
Response.Write Server.HTMLEncode(" (0x" & Hex(objASPError.Number) & ")" ) & "<br>"
If objASPError.ASPDescription > "" Then
Response.Write Server.HTMLEncode(objASPError.ASPDescription) & "<br>"
blnErrorWritten = False
' Only show the Source if it is available and the request is from the same machine as IIS
If objASPError.Source > "" Then
strServername = LCase(Request.ServerVariables("SERVER_NAME"))
strServerIP = Request.ServerVariables("LOCAL_ADDR")
strRemoteIP = Request.ServerVariables("REMOTE_ADDR")
If (strServername = "localhost" Or strServerIP = strRemoteIP) And objASPError.File <> "?" Then
Response.Write Server.HTMLEncode(objASPError.File)
If objASPError.Line > 0 Then Response.Write ", 第 " & objASPError.Line & " 行"
If objASPError.Column > 0 Then Response.Write ", 第 " & objASPError.Column & " 列"
Response.Write "<br>"
Response.Write "<font style=""COLOR:000000; FONT: 9pt 宋体""><b>"
Response.Write Server.HTMLEncode(objASPError.Source) & "<br>"
If objASPError.Column > 0 Then Response.Write String((objASPError.Column - 1), "-") & "^<br>"
Response.Write "</b></font>"
blnErrorWritten = True
End If
End If
If Not blnErrorWritten And objASPError.File <> "?" Then
Response.Write "<b>"
Response.Write Server.HTMLEncode(objASPError.File)
If objASPError.Line > 0 Then Response.Write Server.HTMLEncode(", 第 " & objASPError.Line & " 行")
If objASPError.Column > 0 Then Response.Write ", 第 " & objASPError.Column & " 列"
Response.Write "</b><br>"
End If
%>
</li>
<p>
<li>浏览器类型:<br>
<%= Server.HTMLEncode(Request.ServerVariables("HTTP_USER_AGENT")) %>
</li>
<p>
<li>页:<br>
<%
strMethod = Request.ServerVariables("REQUEST_METHOD")
Response.Write strMethod & " "
If strMethod = "POST" Then
Response.Write Request.TotalBytes & " bytes to "
End If
Response.Write Request.ServerVariables("SCRIPT_NAME")
lngPos = InStr(Request.QueryString, "|")
If lngPos > 1 Then
Response.Write "?" & Server.HTMLEncode(Left(Request.QueryString, (lngPos - 1)))
End If
Response.Write "</li>"
If strMethod = "POST" Then
Response.Write "<p><li>POST 数据:<br>"
If Request.TotalBytes > lngMaxFormBytes Then
Response.Write Server.HTMLEncode(Left(Request.Form, lngMaxFormBytes)) & " . . ."
Else
Response.Write Server.HTMLEncode(Request.Form)
End If
Response.Write "</li>"
End If
%>
<p>
<li>时间:<br>
<%
datNow = Now()
Response.Write Server.HTMLEncode(FormatDateTime(datNow, 1) & ", " & FormatDateTime(datNow, 3))
Session.Codepage = bakCodepage
%>
</li>
</p>
<p>
<li>详细信息:<br>
<% strQueryString = "prd=iis&sbp=&pver=5.0&ID=500;100&cat=" & Server.URLEncode(objASPError.Category) & _
"&os=&over=&hrd=&Opt1=" & Server.URLEncode(objASPError.ASPCode) & "&Opt2=" & Server.URLEncode(objASPError.Number) & _
"&Opt3=" & Server.URLEncode(objASPError.Description)
strURL = "http://www.microsoft.com/ContentRedirect.asp?" & _
strQueryString
%>
<a href="<%= strURL %>">Microsoft 支持</a>
</li>
</p>
</font></td>
</tr>
</table>
</body>
</html>
Top
2 楼mackyliu(才子-54caizi.com)回复于 2004-09-04 09:45:54 得分 15
目录权限问题。在目录上右键--属性--安全,添加everyone所有权限。Top
3 楼sunboby(其实我爱你)回复于 2004-09-04 09:49:56 得分 0
Microsoft OLE DB Provider for ODBC Drivers 错误 '80004005'
[Microsoft][ODBC Microsoft Access Driver]常见错误 不能打开注册表关键字 'Temporary (volatile) Jet DSN for process 0x868 Thread 0x8ec DBC 0x2b22c64 Jet'。
/conn1.asp,行6
你的这个错误是找不到包含文件,
可能你的路径写错了,你好好看看Top
4 楼lilu207(lilu)回复于 2004-09-04 09:53:57 得分 0
在哪里设置这个目录权限
^^我比较菜,这么白痴的问题:)Top
5 楼phyllis2001(晚秋枫叶)回复于 2004-09-04 09:57:51 得分 5
权限不够~~比如你的主目录在d盘的www,你右键www--属性--安全,给everyon或者运行iis的用户添加所有权限Top
6 楼lilu207(lilu)回复于 2004-09-04 10:00:55 得分 0
成了,谢谢Top
7 楼lilu207(lilu)回复于 2004-09-04 10:02:06 得分 0
但是好象不太安全吧,访问的人岂不是可以任意修改程序了?Top
8 楼lilu207(lilu)回复于 2004-09-04 12:10:21 得分 0
sunboby(其实我爱你) :我这里的文件都是好的,在别的电脑上能运行。你的回复对我的情况不对,所以没有给分,抱歉:)因为分数有限,谢谢关注!Top




