Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if request.querystring("do")="customer" then
- New_customer = request.Form("customer")
- openconn con
- sSQL="SELECT RelationNumber FROM Relations WHERE RelationName='" & New_customer & "'"
- set rst = con.execute(sSQL)
- if rst.EOF then
- response.write "No relation found"
- else
- Relationnumber_update = rst("RelationNumber")
- sSQL2="SELECT Number FROM Orders WHERE Relation=" & Relationnumber_update & ""
- set rst2 = con.execute(sSQL2)
- if rst2.EOF then
- response.write("No order number found!")
- else
- if Relationnumber_update <> 1000 then
- Ordernumber_update = rst2("Nummer")
- sSQL3="UPDATE Bookings SET Order=" & Ordernumber_update & " WHERE ID=" & request("ID")
- con.execute(sSQL3)
- else
- response.write("Order number 1000 is not allowed!")
- end if
- end if
- end if
- closeconn con
- response.redirect("myPage.asp?action=page")
- response.end
- end if
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement