奇怪的现象
代码运行没有报错,但是每次写入数据库的时候会在末尾写进38条空数据,请教高手看下代码,哪里有问题<%
if request("hid1")="ok" then
nowselldate=request("selldate")
nowenddate=request("enddate")
nowbeizhu=request("beizhu")
nowprice=request("price")
nowbzr=request("bzr")
nowtype=request("type")
nowid_danwei=request("id_danwei")
nowid_produit=request("id_produit")
nowid_huiyuan=request("id_huiyuan")
nowid_login=request("id_login")
set rs_login=conn.execute("select * from login where id="&nowid_login)
nowid_ku=request("id_ku")
set rs_ku=conn.execute("select * from ku where id="&nowid_ku)
nowid_gys=request("id_gys")
nowgys=request("gys")
nowjxf=request("jxf")
nowybf=request("ybf")
nowgrxs=request("grxs")
nowfcf=request("fcf")
nowaqf=request("aqf")
nowgj=request("gj")
nowbianhao=replace(replace(replace(replace(replace(replace(FormatDateTime(now(),0),":","")," ",""),"-",""),"/",""),"上午",""),"下午","")
'totalshulian=0
if nowprice2="" then
nowprice2=0
end if
if nowprice1="" then
nowprice1=0
end if
if nowshulian="" then
nowshulian=0
end if
for x=1 to maxproduit
nowhuohao=request("huohao"&x)
nowtitle=request("title"&x)
nowshulian=request("shulian"&x)
nowid_danwei=request("id_danwei"&x)
nowprice2=request("price2"&x)
nowprice1=request("price1"&x)
nowbigclass=request("bigclass"&x)
if nowprice2="" then
nowprice2=0
end if
if nowprice1="" then
nowprice1=0
end if
if nowshulian="" then
nowshulian=0
end if
set rs=server.createobject("ADODB.RecordSet")
sql="select * from b3j where 1=2"
rs.open sql,conn,1,3
rs.addnew
rs("huohao")=nowhuohao
rs("title")=nowtitle
rs("shulian") =nowshulian
rs("id_danwei")=nowid_danwei
rs("price1")=nowprice1
rs("price2")=nowprice2
rs("bigclass")=nowbigclass
rs("id_gys")=nowid_gys
rs("id_produit")=nowid_produit
rs("id_huiyuan")=nowid_huiyuan
rs("price")=nowprice
rs("id_ku")=nowid_ku
rs("bzr")=nowbzr
rs("gys")=nowgys
rs("type")=nowtype
rs("selldate")=nowselldate
rs("enddate")=nowenddate
rs("id_login")=nowid_login
rs("login")=rs_login("username")
rs("bianhao")=nowbianhao
rs("beizhu")=nowbeizhu
rs("ybf")=nowybf
rs("jxf")=nowjxf
rs("grxs")=nowgrxs
rs("fcf")=nowfcf
rs("aqf")=nowaqf
rs("gj")=nowgj
rs("jggr")= nowprice1*nowshulian
rs("pggr")= nowprice2*nowshulian
rs.update
next
%>