酒泉市长河康华网络通信设备厂
首页 | 联系方式 | 加入收藏 | 设为首页 | 手机站

产品目录

联系方式

联系人:业务部
电话: 00149-634103
邮箱:service@xrhg88.com

当前位置:首页 >> 新闻中心 >> 正文

谁能坚持超过50秒,我请他吃…

字号:
摘要:谁能坚持超过50秒,我请他吃…

谁帮我解决这个急题我请他吃大餐!^_^

01-13

--------------------------------------------------------------------------------rnrn想实现数据库里有这条记录就修改,没有这条记录就增加新记录rnrn<%rnrncustomercode = request("customercode")rnfundnumber = request("fundnumber")rnposition = request("position")rnrnset rs=server.createobject("adodb.recordset")rnsqltext="select customercode,fundnumber,position,Sum(quantity) as sum_chnum from flowmanage where customercode='"&customercode&"' and fundnumber='"&fundnumber&"' and position='"&position&"' and state='出厂' group by customercode,fundnumber,position"rnrs.open sqltext,conn,1,1rnrnsum_chnum=rs("sum_chnum")rnrnset rs=server.createobject("adodb.recordset")rnsqltext="select customercode,fundnumber,position,Sum(quantity) as sum_quantity from flowmanage where customercode='"&customercode&"' and fundnumber='"&fundnumber&"' and position='"&position&"' group by customercode,fundnumber,position"rnrs.open sqltext,conn,1,1rnrnIf not rs.eof and not rs.bof thenrnrncustomercode = rs("customercode")rnfundnumber = rs("fundnumber")rnposition = rs("position")rnrnsum_quantity = rs("sum_quantity")rnrnrnset strrs = server.CreateObject("adodb.recordset")rnsql = "select * from planmanage where customer='"&customercode&"' and fundnumber='"&fundnumber&"' and bwei='"&position&"'"rnstrrs.open sql,conn,1,3rnrnif not rs.eof thenrnrnstrrs("customer") = customercodernstrrs("fundnumber") = fundnumberrnstrrs("bwei") = positionrnstrrs("quantity") = sum_quantityrnstrrs("chnum") = sum_chnumrnstrrs.updaternrnelsernrnstrrs.addnewrnstrrs("customer") = customercodernstrrs("fundnumber") = fundnumberrnstrrs("bwei") = positionrnstrrs("quantity") = sum_quantityrnstrrs("chnum") = sum_chnumrnstrrs.updaternend ifrnrnstrrs.closernstrrs = nothingrnrnresponse.write" "rnelsernresponse.write " 还没添加计划"rnresponse.endrnend ifrn%> 论坛