各位ASP高手,帮忙看下这段程序对吗?不对的话帮忙更正下!

来源:百度知道 编辑:UC知道 时间:2024/06/30 14:01:12
'//批量更改商品库存
if selectm="" then
selectm=request.QueryString("selectm")
end if
selectshopxpptid=request("selectshopxpptid")
kucun=request("kucun")
if selectshopxpptid<>"" then
conn.execute "update shopxp_product set kucun=kucun where shopxpptid in ("&selectshopxpptid&")"
response.Redirect "managept_kucun.asp"
response.End
end if
%>大家帮忙看看这段代码对吗?不对的话帮忙更正下!

conn.execute "update [shopxp_product] set kucun='"&kucun&"' where shopxpptid in ("&selectshopxpptid&")"
是否为集合?
dim shopid,shoparr
shoparr=split(selectshopxpptid,",")
for i=1 to ubound(shoparr)
conn.execute "update [shopxp_product] set kucun='"&kucun&"' where shopxpptid="&cint(shoparr(i))
next
试一下应该没有错

conn.execute "update [shopxp_product] set kucun=kucun where shopxpptid in ("&selectshopxpptid&")"
改成
conn.execute "update [shopxp_product] set kucun="&kucun&" where shopxpptid in ("&selectshopxpptid&")"

你原来那样..记录老是修改不了的.

而且selectshopxpptid的值是不是 1,2,3这种.如果不是..也是会出错的