日期:2014-05-17  浏览次数:20554 次

保存的时候会保存两次
<%
    outh=cint(request("outh"))
    customer=request("customer")
    area=request("area")
if request("quoteno")="" then
    connstrdan="Driver={SQL Server};server=symserver;database=dan2003;uid=lxy;pwd=82910555623" 
    Set conndan = Server.CreateObject("ADODB.Connection") 
    conndan.Open connstrdan 
    Set rs_goods= Server.CreateObject("ADODB.RecordSet") 
    sql1="exec quoteorderno @a="&area
    Rs_goods.open sql1,conndan
    quoteno=rs_goods("orderno")
else
quoteno=request("quoteno")
end if
    bjbb=request("bjbb")
    linkman=request("linkman")
    khaddress=request("khaddress")
    quotedate=request("quotedate")
    khtel=request("khtel")
khfax=request("khfax")
    tax=request("tax")
    tote=request("tote")
    remark=request("remark")
    payment=request("payment")
    deliverytime=request("deliverytime")
    deliveryaddress=request("deliveryaddress")
    usetime=request("usetime")
    director=request("director")
    operation=request("operation")

connstr="Driver={SQL Server};server=symserver;database=dan2003;uid=lxy;pwd=82910555623" 
Set conn = Server.CreateObject("ADODB.Connection") 
conn.Open connstr
sql="Select * From quote Where quoteno='"& quoteno & "'"
Set rs=conn.Execute(sql)
If Not rs.EOF Then
Response.Write "<script language='javascript'>"
Response.Write "alert('报价单号重复!');"
Response.Write "window.history.go(-1);"
Response.Write "</script> "
Response.End
End If
Set rs=Server.CreateObject("ADODB.Recordset")
sql="Select * From quote"
rs.Open sql,connstr,1,3
rs.AddNew
    rs("customer")=customer
    rs("area")=area
    rs("bjbb")=bjbb
    rs("linkman")=linkman
    rs("quoteno")=quoteno
    rs("khaddress")=khaddress
    rs("quotedate")=quotedate
    rs("khtel")=khtel
    rs("khfax")=khfax
    rs("tax")=tax
    rs("tote")=tote
    rs("remark")=remark
    rs("payment")=payment
    rs("deliverytime")=deliverytime
    rs("deliveryaddress")=deliveryaddress
    rs("usetime")=usetime
    rs("director")=director
    rs("operation")=operation
    rs("updatetime")=now()
    rs("del1")=0
rs.Update
rs.Close

Set rs=Server.CreateObject("ADODB.Recordset")
sql="Select * From quotedetail"
rs.Open sql,connstr,1,3
if outh<>"" then
rsh=outh-1
end if
for i=0 to rsh
    if isempty(request("code1"&i)) then