<% ' Property of and written by Adam Ford --> dim HID const intSold = 4 HID = request.querystring("hid") ' Make sure a number was passed correctly if isNumeric(HID) then HID = clng(HID) else HID = 0 end if ' Create the SQL statement strSQL = "UPDATE Houses SET comments='" & request.form("comments") & "', maplink='" & request.form("maplink") & "', cid=" & request.form("cid") & _ ", ciid=" & request.form("ciid") & ", ctid=" & request.form("ctid") & ", hbathrooms=" & request.form("hbathrooms") & _ ", price='" & request.form("price") & "', fbathrooms=" & request.form("fbathrooms") & ", bedrooms=" & request.form("bedrooms") & _ ", garage='" & request.form("garage") & "',address='" & request.form("ADDRESS") & "', sfeet='" & request.form("sfeet") & _ "', sid=" & request.form("sid") & " WHERE HID=" & HID & ";" ' Open a recordset objDBConn.execute strSQL if cint(request.form("sid")) = intSold then strSQL = "UPDATE Houses SET SoldDate=#" & date() & "# WHERE HID=" & HID & ";" objDBConn.execute strSQL end if HID = empty %> <% on error resume next if err.number <> 0 then dim strPage strPage = "act_updatehouse.asp" response.write(strSQL) %> <% end if response.redirect ("dsp_main.asp") %>