上海银行总行行号:无法更新数据 rscard.update

来源:百度文库 编辑:杭州交通信息网 时间:2024/04/28 00:04:40
<%
dim rscst,rsgame,rstype,getnum,rscard,rslog,rslog1
set rscard=server.createobject("adodb.recordset")
set rslog=server.createobject("adodb.recordset")
set rslog1=server.createobject("adodb.recordset")
set rscst=server.createobject("adodb.recordset")
set rsgame=server.createobject("adodb.recordset")
set rstype=server.createobject("adodb.recordset")
rslog.open "select * from getcard_log",conn,1,3
rslog1.open "select * from gcardsstok",conn,1,3
getnum=int(request(buy_number))
rscst.open "select * from alist where username='"&session("login_user")&"' and gametype="&request("game")&" and cardtype="&request("type")&"",conn,1,3
if rscst.eof and rscst.bof then
response.write("<script>alert('你没有该卡的库存');history.go(-1)</script>")
response.end
end if
rscard.open "select top " & request("buy_number") & " * from cardsstok where gametypeid="&request("game")&" and areatypeid="&request("type")&" and saled=1 and saledto='"&session("login_user")&"' and used=0 order by id desc",conn,1,3
if rscard.eof and rscard.bof then
response.write("<script>alert('你没有该卡的库存!');history.go(-1)</script>")
response.end
end if
do while not rscard.eof

'检查卡
rstype.open "select * from cardstype where id="&rscst("cardtype")&"",conn,1,1
if rstype.eof and rstype.bof then
response.write("<script>alert('系统出错!');history.go(-1)</script>")
response.end
end if

rsgame.open "select * from gametypes where id="&rscst("gametype")&"",conn,1,1
if rsgame.eof and rsgame.bof then
response.write("<script>alert('系统出错!');history.go(-1)</script>")
response.end
end if
supsite=rsgame("supsite")
'扣数
rscst.modify
if rscst("number")>0 then
rscst("number")=rscst("number")-1
else
rscst("number")=0
response.write("<script>alert('数据溢出!');history.go(-1)</script>")
response.end
end if
rscst.update

rscard.modify
rscard("used")=1
rscard.update
rscard.modify
rscard("used")=1
rscard.update

无法更新数据是什么原因

回答:宸缘
学弟
9月28日 16:27 要更新的时候游戏运行程序自动会更新的