修改多条记录无法成功~
请各位高手帮忙看看,有一个问题,我要实现的功能是:选中多条记录,然后将选中的记录传到另一个页面修改保存,代码如下,但是提交后却只能够修改第一条记录,其他记录均未修改成功,但是将输出语句放在循环体中却能输出每一条记录。
if request.Form("submit")="入库选中订单" then
ckb=request.form("chkb")
if ckb<>empty then
setArry=split(ckb,",")
for i=0 to UBound(setArry)
sql2="Update [Order] set In_state=1 where Orderid='"&setArry(i)&"'"
conn.execute(sql2)
//response.Write(setArry(i))
//response.Write(i&"<p>")
next
response.Write("<script language='javascript'>alert('成功入库所有订单!');window.document.location.href='order_manager.asp';</script>")
else
response.Write("错误!")
end if
end if