Current Recordset does not support updating.奇怪 出错了

fisherboy 2012-01-31 10:44:00
在godaddy买了个空间,把数据库和代码传上去,发现出错了

Current Recordset does not support updating. This may be a limitation of the provider, or of the selected locktype


我在本地测试是完好的。

怎么解决呢
...全文
201 11 打赏 收藏 转发到动态 举报
写回复
用AI写文章
11 条回复
切换为时间正序
请发表友善的回复…
发表回复
fisherboy 2012-02-01
  • 打赏
  • 举报
回复
2007版本
access的用户权限在哪里设置?
fisherboy 2012-02-01
  • 打赏
  • 举报
回复
1,3 是肯定1,3

ACCESS数据库。我用各种方法创建了access数据库都没用
我也换了2007版本的 db.accdb 也换了2000版的 db.mdb
fisherboy 2012-02-01
  • 打赏
  • 举报
回复
刚买的godaddy的windows主机,把ASP传上去之后,发现只能读取数据,但是无法把数据写入数据库

sql="select * from biao where id=1"
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,3
rs("txt")="新内容"
rs.update
rs.close


代码就类似上面的。我在本地计算机可以执行,写入数据。
但是传到godaddy就无法写入数据了。
为什么啊?
aa1bb2cc3dd3 2012-02-01
  • 打赏
  • 举报
回复
1楼正解,如果还是不行的话,看下服务器上的数据库文件是否有写入权限。
fisherboy 2012-02-01
  • 打赏
  • 举报
回复
ADODB.Recordset error '800a0cb3'

Current Recordset does not support updating. This may be a limitation of the provider, or of the selected locktype.

hookee 2012-02-01
  • 打赏
  • 举报
回复
提示错误 怎么变掉了?之前提示是locktype的错误。

'80004005' 就是权限问题了。要找供应商设置mdb的写权限了。
kris2010 2012-02-01
  • 打赏
  • 举报
回复
IUSR_ **** 这个用户没有读写权限, 你可以询问下空间的目录权限, 应该有读写权限的.
fisherboy 2012-02-01
  • 打赏
  • 举报
回复
hookee

我要告诉你,上面你提供的代码 没有用啊。

提示错误

Microsoft Office Access Database Engine error '80004005'

Operation must use an updateable query



国外的服务器很严格吗?

下面我把完整代码贴出来, 你帮我纠正



<%
db="hookee.mdb"
Set Conn=Server.CreateObject("ADODB.Connection")
ConnStr="Provider=Microsoft.Jet.OLEDB.4.0;Data Source="&Server.mappath(db)
Conn.Open ConnStr
%>

<!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=utf-8" />
<title>update</title>
</head>

<body>

<%
sql="select * from [biao] where ID=1"

Set myrs=Server.CreateObject("adodb.recordset")

myrs.cursorLocation = 3

myrs.open sql,conn,1,3

If Not (myrs.bof and myrs.eof) Then
myrs("myname") = "xxxx" '用英文试试看, 国外的服务器最好用英文版本的.mdb文件
myrs.update
End If



myrs.close
Set myrs=Nothing

Conn.close
Set Conn=Nothing

%>

执行完毕!

</body>
</html>
hookee 2012-02-01
  • 打赏
  • 举报
回复
改一下:

<%
sql = "select * from biao where id=1"
set rs = createobject("adodb.recordset")
rs.cursorLocation = 3
rs.open sql,conn,1,3
If Not (rs.bof and rs.eof) Then
rs("txt") = "xxxx" '用英文试试看, 国外的服务器最好用英文版本的.mdb文件
rs.update
End If
rs.close
set rs = nothing
conn.close
set conn = nothing
%>

hookee 2012-02-01
  • 打赏
  • 举报
回复

<%
sql = "select * from biao where id=1"
set rs = createobject("adodb.recordset")
rs.cursorLocation = 3
rs.open sql,conn,1,3
If Not (rs.bof and rs.eof) Then
rs("txt") = "xxxx" '用英文试试看, 国外的服务器最好用英文版本的.mdb文件
End If
rs.update
rs.close


%>
hookee 2012-02-01
  • 打赏
  • 举报
回复
记录集打开方式对吗?
rs.Open sql, conn, 1, 3
1, 3可以做更新操作, 1, 1不行

28,391

社区成员

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

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