| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 206 人关注过本帖
标题:[求助]批量更新数据库无法实现,麻烦各位指点一下
只看楼主 加入收藏
qd00713
Rank: 1
等 级:新手上路
帖 子:7
专家分:0
注 册:2007-9-24
收藏
 问题点数:0 回复次数:0 
[求助]批量更新数据库无法实现,麻烦各位指点一下

<%
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

%>
批量更新没法实现,没有错误提示,请高手指点指点!

2007-10-16 13:34
快速回复:[求助]批量更新数据库无法实现,麻烦各位指点一下
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.017334 second(s), 9 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved