<%
action=trim(request("action"))
select case action
case "update"
bookname=trim(request("strname"))
bookname=split(bookname,",")
grade=trim(request("price1"))
grade=split(grade,",")
isbn=trim(request("price2"))
isbn=split(isbn,",")
shichangjia=trim(request("price3"))
shichangjia=split(shichangjia,",")
huiyuanjia=trim(request("price4"))
huiyuanjia=split(huiyuanjia,",")
vipjia=trim(request("price5"))
vipjia=split(vipjia,",")
kucun=trim(request("stock"))
kucun=split(kucun,",")
bookchuban=trim(request("stock2"))
bookchuban=split(bookchuban,",")
yeshu=trim(request("score"))
yeshu=split(yeshu,",")
set rs=server.CreateObject("adodb.recordset")
rs.Open "select bookid,bookname,grade,isbn,shichangjia,huiyuanjia,vipjia,kucun,bookchuban,yeshu from products",conn,1,3
For i=LBound(bookid) To UBound(bookid)
If not rs.eof Then
rs.movefirst
rs("bookname")=trim(request("strname")(i))
rs("grade")=trim(request("price1")(i))
rs("isbn")=trim(request("price2")(i))
rs("shichangjia")=trim(request("price3")(i))
rs("huiyuanjia")=trim(request("price4")(i))
rs("vipjia")=trim(request("price5")(i))
rs("kucun")=trim(request("stock")(i))
rs("bookchuban")=trim(request("stock2")(i))
rs("yeshu")=trim(request("score")(i))
rs.update
rs.movenext
end if
NEXT
rs.close
set rs=nothing
response.write "<script language=javascript>alert('更新成功,请返回!');history.go(-1);</script>"
response.End
end select
%>
批量更新没法实现,没有错误提示,请高手指点指点!