Advertisement
Guest User

Untitled

a guest
Mar 4th, 2015
197
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.17 KB | None | 0 0
  1. if request.querystring("do")="customer" then
  2.  
  3. New_customer = request.Form("customer")
  4.  
  5. openconn con
  6.  
  7. sSQL="SELECT RelationNumber FROM Relations WHERE RelationName='" & New_customer & "'"
  8. set rst = con.execute(sSQL)
  9.  
  10. if rst.EOF then
  11. response.write "No relation found"
  12.  
  13. else
  14. Relationnumber_update = rst("RelationNumber")
  15.  
  16. sSQL2="SELECT Number FROM Orders WHERE Relation=" & Relationnumber_update & ""
  17. set rst2 = con.execute(sSQL2)
  18.  
  19. if rst2.EOF then
  20. response.write("No order number found!")
  21. else
  22. if Relationnumber_update <> 1000 then
  23. Ordernumber_update = rst2("Nummer")
  24.  
  25. sSQL3="UPDATE Bookings SET Order=" & Ordernumber_update & " WHERE ID=" & request("ID")
  26. con.execute(sSQL3)
  27.  
  28. else
  29. response.write("Order number 1000 is not allowed!")
  30. end if
  31. end if
  32. end if
  33.  
  34. closeconn con
  35.  
  36. response.redirect("myPage.asp?action=page")
  37. response.end
  38.  
  39. end if
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement