请给看看这是什么原因造成的,不能更新 数据库或对象为只读
错误类型:Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[Microsoft][ODBC Microsoft Access Driver] 不能更新。数据库或对象为只读。
/ww/exam/exam/iamno_lx.asp, 第 49 行
iamno_lx.asp的代码如下:
<!--#include file="conn.asp"-->
<%
if session("username")="" then
response.redirect "relogin.asp"
end if
%><html>
<%
username=request.cookies("username")
kcid=request("kcid")
chapter=request("chapter")
sql1="SELECT * from tbistest where username='"&username&"' and kao=0 and kcid="&kcid&" and chapter="&chapter
set rs1=server.createobject("adodb.recordset")
rs1.open sql1,conn,3,2
do while not rs1.eof
rs1("istest")=0
rs1.update
rs1.movenext
loop
sqldel1="SELECT uans,userdata.isread,userdata.tmid from tbtk,userdata where username='"&username&"' and tbtk.tmid=userdata.tmid and kao=0 and tbtk.kcid="&kcid&" and chapter="&chapter&" order by userdata.tmid "
set rsdel1=server.createobject("adodb.recordset")
rsdel1.open sqldel1,conn,3,2
do while not rsdel1.eof
if rsdel1("isread")=1 then
sqldel2="SELECT * from userdataread where username='"&username&"' and tmid="&rsdel1("tmid")&" and paperno=0 order by readid "
set rsdel2=server.createobject("adodb.recordset")
rsdel2.open sqldel2,conn,3,2
do while not rsdel2.eof
rsdel2("ruans")=""
rsdel2.update
rsdel2.movenext
loop
end if
rsdel1("uans")=""
rsdel1.update 行49
rsdel1.movenext
loop
response.redirect "selecttype.asp?kcid="&kcid&"&chapter="&chapter
%>