| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 525 人关注过本帖
标题:操作必须使用一个可更新的查询
只看楼主 加入收藏
zdloveday
Rank: 2
等 级:论坛游民
帖 子:221
专家分:96
注 册:2008-9-5
结帖率:68.89%
收藏
已结贴  问题点数:10 回复次数:3 
操作必须使用一个可更新的查询
<%
Sub onlineuser()
statid = replace(Request.ServerVariables("REMOTE_HOST"),".","")
session("statid") = statid
filename = request.ServerVariables("SCRIPT_NAME")
postion = InstrRev(fileName,"/")+1
useract = Mid(fileName,postion)
dim act
select case useract
    case "adminthread.asp"
        act = "管理贴子"
    case "allface.asp"
        act = "查看论坛所有头像"
    case "announcement.asp"
        act = "查看论坛公告"
    case "board.asp"
        act = "查看论坛版块"
    case "delpost.asp"
        act = "删除贴子"
    case "delthread.asp"
        act = "删除主题"
    case "editpost.asp"
        act = "编辑贴子"
    case "editthread.asp"
        act = "编辑主题"
    case "faq.asp"
        act = "查看论坛帮助"
    case "index.asp"
        act = "论坛首页"
    case "login.asp"
        act = "登录论坛"
    case "lostpass.asp"
        act = "找回密码"
    case "movethread.asp"
        act = "移动主题"
    case "newreply.asp"
        act = "发布回复"
    case "newthread.asp"
        act = "发布新的主题"
    case "newvote.asp"
        act = "发布新的投票"
    case "onlinelist.asp"
        act = "会员在线状态"
    case "pm.asp"
        act = "使用悄悄话"
    case "register.asp"
        act = "正在注册"
    case "search.asp"
        act = "使用论坛搜索"
    case "showposterip.asp"
        act = "查看用户IP"
    case "showthread.asp"
        act = "浏览贴子"
    case "showvote.asp"
        act = "浏览投票结果"
    case "user.asp"
        act = "查看会员信息"
    case "usercp.asp"
        act = "使用控制面板"
    case "userlist.asp"
        act = "查看会员列表"
    case "logs.asp"
        act = "论坛日志"
End select
'response.Write(act)
userhidden = request.Cookies(JBBMasterCookies)("userhidden")
if userhidden="" or Not(ISnumeric(userhidden)) then userhidden = 0
if BoardID="" then BoardID=0
if threadID="" then threadID=0
thread_title = replace(thread_title,"'","''")
'====================================================
if useronline = true then
    set rs = conn.ExeCute("select userid From JBB_online where userid="&userid)
    if rs.Eof Or rs.Bof then
        sql="insert into JBB_online(uname,times,statid,usergroup,userid,userIP,title,thread_title,threadID,BoardID,act,userhidden) values('"&username&"','"&Now()&"',"&statid&","&usergroup&","&userid&",'"&userIP&"','"&title&"','"&thread_title&"',"&threadID&","&BoardID&",'"&act&"',"&userhidden&")"
    else
        sql="update JBB_online set times='"& Now() &"',statid="& statid &",thread_title='"& thread_title &"',threadID="& threadID &",title='"& title &"',BoardID="& BoardID &",act='"& act &"',userhidden="& userhidden &" where userid="&userid
    End if
    set rs = Nothing
    sql2="update JBB_user set lastactivity='"& Now() &"' where userid="&userid
    conn.execute(sql2)
else   
    set rs = Conn.ExeCute("select statid from JBB_online where statid='"& statid &"' and Uname='游客'")
    if rs.Eof Or rs.Bof then
        sql="insert into JBB_online(uname,times,statid,usergroup,userIP,title,thread_title,threadID,BoardID,act) values('游客','"&Now()&"','"&statid&"',6,'"&userIP&"','"&title&"','"&thread_title&"',"&threadID&","&BoardID&",'"&act&"')"
    else
        sql="update JBB_online set times='"&Now()&"',thread_title='"&thread_title&"',threadID="&threadID&",title='"&title&"',BoardID="&BoardID&",act='"&act&"' where statid='"& statid &"' and Uname='游客'"
    End if
    set rs = Nothing
End if
conn.ExeCute(sql)                    ********** 第91行
'==========================================================
Conn.Execute ("delete from JBB_online where DATEDIFF('s', times, '"& now() &"') > "& BBS_Config(14) &"*60")
End Sub
%>
错误提示:
Microsoft OLE DB Provider for ODBC Drivers 错误 '80004005'

[Microsoft][ODBC Microsoft Access Driver] 操作必须使用一个可更新的查询。
online.asp,行 91
先 谢谢 各位  
搜索更多相关主题的帖子: 查询 
2010-03-15 18:00
aspic
Rank: 17Rank: 17Rank: 17Rank: 17Rank: 17
等 级:贵宾
威 望:51
帖 子:2258
专家分:8050
注 册:2008-2-18
收藏
得分:5 
查看sql
2010-03-15 18:02
aspic
Rank: 17Rank: 17Rank: 17Rank: 17Rank: 17
等 级:贵宾
威 望:51
帖 子:2258
专家分:8050
注 册:2008-2-18
收藏
得分:0 
或者权限
2010-03-15 18:02
yms123
Rank: 16Rank: 16Rank: 16Rank: 16
等 级:版主
威 望:209
帖 子:12488
专家分:19042
注 册:2004-7-17
收藏
得分:5 
什么数据库?
SQL2000检查权限设置
Access检查文件夹及文件权限
2010-03-17 13:31
快速回复:操作必须使用一个可更新的查询
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.020779 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved