请问报下面的错,是什么错误?

sunny2004 2004-06-14 01:40:32
我在网上下载了一套文章发布系统,安装后运行提交文章报错如下:

Microsoft VBScript 编译器错误 错误 '800a03f6'

缺少 'End'

/iisHelp/common/500-100.asp,行242

Microsoft OLE DB Provider for ODBC Drivers 错误 '80004005'

[Microsoft][ODBC Microsoft Access Driver] 不能更新。数据库或对象为只读。

/admin/addnews2.asp,行145

请高手看看!
...全文
72 8 打赏 收藏 转发到动态 举报
写回复
用AI写文章
8 条回复
切换为时间正序
请发表友善的回复…
发表回复
  • 打赏
  • 举报
回复
找到那个access数据库文件,右键,选择属性->安全,然后赋予everyone完全控制权限~
cometzg 2004-06-14
  • 打赏
  • 举报
回复
你的操作系统?
你的脚本目录的属性?
修改其属性。
sunny2004 2004-06-14
  • 打赏
  • 举报
回复
不是open参数的问题。
addnew2.asp的代码为:
<!--#include file=conn.asp -->
<!--#include file=../include/config.asp -->
<!--#include file=chkuser.asp -->

<%
function changechr(str)
changechr=replace(replace(replace(replace(str,"<","<"),">",">"),chr(13),"<br>")," "," ")
changechr=replace(changechr,"'",""")
changechr=replace(changechr,mid(" "" ",2,1),""")
end function
SmallClassid=Request.Form("SmallClassid")
if SmallClassid="" then
%>
<script language=javascript>
history.go(-1)
alert("请选择该文章所属小类")
</script>
<%
Response.End
end if

if session("key")="smallmaster" then
set rs2=server.createobject("adodb.recordset")
dim bigclassid
sql2="select * from smallclass where SmallClassid=" &SmallClassid
rs2.open sql2,conn,1,1
bigclassid=rs2("bigclassid")
rs2.close
set rs2=nothing
else
bigClassid=Request.Form("bigClassid")
if bigclassid="" then
%>
<script language=javascript>
history.go(-1)
alert("请选择该文章所属大类")
</script>
<%
Response.End
end if
end if

title=request.form("title")
if title="" then
%>
<script language=javascript>
history.back()
alert("请填写文章标题!")
</script>
<%
Response.End
end if

if len(title)>100 then
%>
<script language=javascript>
history.back()
alert("文章标题过长!")
</script>
<%
Response.End
end if

Content=Request.Form("Content")
if Content="" then
%>
<script language=javascript>
history.back()
alert("请输入文章内容!")
</script>

<%
Response.End
end if

if request.Form("goodnews")="1" then
goodnews=1
else
goodnews=0
end if

if request.Form("picnews")="1" then
picnews=1
else
picnews=0
end if

if request.Form("istop")="1" then
istop=1
else
istop=0
end if

if request.Form("sypic")="1" then
sypic=1
else
sypic=0
end if

dim filename
filename=session("filename")
SpecialID=Request.Form("SpecialID")
SpecialID2=Request.Form("SpecialID2")
title=changechr(trim(request.form("title")))
Author=replace(trim(Request.Form("Author")),"'","''")
Original=replace(trim(Request.Form("Original")),"'","''")
about=Request.Form("about")
editor=request.form("editor")
checkked=request.form("checkked")
image=Request.Form("image")
EnCode=Request.Form("EnCode")

dim typeid
set rs11=server.createobject("adodb.recordset")
sql11="select * from bigclass where bigclassid=" & bigclassid
rs11.open sql11,conn,1,1
typeid=rs11("typeid")
rs11.close
set rs11=nothing

set rs=server.createobject("adodb.recordset")
sql="select * from news"
rs.open sql,conn,1,3
rs.addnew
rs("title")=title
rs("Author")=Author
rs("content")=content
rs("Original")=Original
rs("goodnews")=goodnews
rs("sypic")=sypic
rs("picnews")=picnews
rs("image")=image
rs("istop")=istop
rs("editor")=editor
rs("checkked")=checkked
rs("BigClassid")=BigClassid
rs("SmallClassid")=SmallClassid
rs("SpecialID")=SpecialID
rs("SpecialID2")=SpecialID2
rs("EnCode")=EnCode
rs("about")=about
rs("picname")=filename
rs("typeid")=typeid
rs("UpdateTime")=now()
rs.update

dim username
username=session("username")
set rs2=server.createobject("adodb.recordset")
sql2="select * from admin where username='"&username&"'"
rs2.open sql2,conn,1,3
rs2("number")=rs2("number")+1
rs2.update
rs2.close
set rs2=nothing

rs.Close
set rs=nothing
conn.close
set conn=nothing
session("filename")=""
if image=0 then
response.write "<p align=center><font color=red>恭喜您,文章“"&title&"”已经成功添加!<br>"&freetime&"秒钟后返回上页!</font>"
response.write "<meta http-equiv=""refresh"" content="""&freetime&";url=addnews0.asp"">"
else
if upload=1 then
Response.Redirect "UploadImg.asp?title=" &title
else
Response.Redirect "xpUpload.asp?title=" &title
end if
end if
%>
whb147 2004-06-14
  • 打赏
  • 举报
回复
改为
rs.open sqlStr,conn,1,3
看看
whb147 2004-06-14
  • 打赏
  • 举报
回复
我晕
是你的rs的open参数有问题
是以只读打开的
sunny2004 2004-06-14
  • 打赏
  • 举报
回复
我用的是Access数据库怎么改权限啊?
我是新手,请见谅。
skyboy0720 2004-06-14
  • 打赏
  • 举报
回复
权限问题,修改everyone组的权限,看看你的数据库是否已经打开
BlueDestiny 2004-06-14
  • 打赏
  • 举报
回复
你代码也得贴出来啊~
-------------------------

你的数据库属性为只读?
把其权限设为可写。

28,391

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧