下面这段代码是做上移位置的,
id=Request( "id ")
Sequence=Request( "Sequence ")
sid=request( "sid ")
set rs=server.createobject( "adodb.recordset ")
sql= "select * from boardn where ifdel=0 and parentid = " & id & " and boardid= "&sid& " and Sequence= " & Sequence
rs.open sql,conn,1,3
rs(4)=rs(4)-1
rs.update
rs.close
set rs=nothing '以上的可以执行,以下不知怎么回事,不执行,
set rs2=server.createobject( "adodb.recordset ")
sql2= "select top 1 * from boardn where ifdel=0 and parentid = " &id& " and boardid <> " & sid '但是这句话可以打印出来
rs2.open sql2,conn,1,3
rs2(4)=rs2(4)+1 '这里不执行
rs2.update
rs2.close
set rs2=nothing
望大侠解决一下!
------解决方案--------------------
rs2.open sql2,conn,1,3
if not rs2.eof then
rs2(4)=cint(rs2(4))+1
rs2.update
end if
rs2.close
set rs2=nothing