sql语句(mssql和access)

chenxiongg 2009-10-16 09:31:19

classid orderid
9 25
10 35
----------------------------
sql语句
conn.execute ("Update class set orderid=cint(select orderid from class where classID=9) where classID=10")
-----------------------------
该语句在mssql中测试通过
在access中测试出错
Microsoft JET Database Engine 错误 '80004005'

操作必须使用一个可更新的查询。
-------------------------------------------
问这个是什么情况,access为什么出错.
要在access中实现,用一句sql复合语句怎么写?
...全文
56 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
cngothic 2009-10-16
  • 打赏
  • 举报
回复
应该出在cint上.
ACC不支持此函数
chenxiongg 2009-10-16
  • 打赏
  • 举报
回复
晕!你这个是语句错误,set 那里用不了in的,这个更新语句,不是查询
sy_binbin 2009-10-16
  • 打赏
  • 举报
回复
conn.execute ("Update [class] set orderid in(select orderid from [class] where classID=9) where classID=10")

这样试试

28,406

社区成员

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

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