标题:我想批量增加数据,怎么写拉?
取消只看楼主
belin2000
Rank: 3Rank: 3
等 级:论坛游侠
威 望:5
帖 子:975
专家分:194
注 册:2004-6-2
结帖率:0
 问题点数:0 回复次数:3 
我想批量增加数据,怎么写拉?
<% dim i,bookname(30),zuozhe(30),chubanshe(30),outtime(30),piece(30),leibie(30),jianjie(30)
set rs=server.createobject("adodb.recordset")
sql="select * from allbook"
rs.open sql,conn,1,3
for i=0 to 29
bookname(i)=request("bookname"&i)
zuozhe(i)=request("zuozhe"&i)
chubanshe(i)=request("chubanshe"&i)
outtime(i)=request("outtime"&i)
piece(i)=request("piece"&i)
leibie(i)=request("leibie"&i)
jianjie(i)=request("jianjie"&i)
response.write bookname(i)
if bookname(i)="" and zuozhe(i)="" and chubanshe(i)="" and outtime(i)="" and piece(i)="" and leibie(i)="" and jianjie(i)=""  Then exit for
next
response.write j
for i=0 to j
rs.addnew
rs("bookname")=bookname(i)
rs("zuozhe")=zuozhe(i)
rs("chubanshe")=chubanshe(i)
rs("outtime")=outtime(i)
rs("piece")=piece(i)
rs("leibie")=leibie(i)
rs("jianjie")=jianjie(i)
rs.update
next
response.write("本次共添加了")
response.write i
response.write("条数据")
response.write "<br><a href=insbook.asp>我还要添加</a>"
response.write "<br><a href=updatebook.asp>我要修改数据</a>"
%>
搜索更多相关主题的帖子: quot request 批量 amp bookname 
2004-06-17 13:45
belin2000
Rank: 3Rank: 3
等 级:论坛游侠
威 望:5
帖 子:975
专家分:194
注 册:2004-6-2
得分:0 
说说怎么改拉,,,我现在烦恼中拉!!

59ita点com(我就爱TA)
2004-06-17 14:30
belin2000
Rank: 3Rank: 3
等 级:论坛游侠
威 望:5
帖 子:975
专家分:194
注 册:2004-6-2
得分:0 
这个问题我解决了,想看的人就回帖吧!!

59ita点com(我就爱TA)
2004-06-18 12:06
belin2000
Rank: 3Rank: 3
等 级:论坛游侠
威 望:5
帖 子:975
专家分:194
注 册:2004-6-2
得分:0 
你有能力就帮我改好,^_^,,,

59ita点com(我就爱TA)
2004-06-18 15:30



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-2596-1-1.html




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

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