<% ' Property of and written by Adam Ford --> dim strFilename dim strComments if len(upl.form("comments")) > 255 then strComments = right(upl.form("comments"),255) else strComments = upl.form("comments") end if ' Create the SQL statement IF NOT oFile Is Nothing Then ' Get the path of the file and return just the filename to store in db strFilename = oFile.FileName strSQL = "insert into houses (filename,comments,maplink,cid,ciid,ctid,price,fbathrooms,hbathrooms,bedrooms,garage,address,sid,sfeet) " & _ "values ('" & strFilename & "','" & strComments & "','" & upl.form("maplink") & "'," & upl.form("cid") & _ "," & upl.form("ciid") & "," & upl.form("ctid") & _ ",'" & upl.form("price") & "'," & upl.form("fbathrooms") & "," & upl.form("hbathrooms") & "," & upl.form("bedrooms") & _ ",'" & upl.form("garage") & "','" & upl.form("address") & "',2," & upl.form("sfeet") & ");" else strSQL = "insert into houses (comments,maplink,cid,ciid,ctid,price,fbathrooms,hbathrooms,bedrooms,garage,address,sid,sfeet) " & _ "values ('" & strComments & "'," & upl.form("maplink") & "'," & upl.form("cid") & _ "," & upl.form("ciid") & "," & upl.form("ctid") & _ ",'" & upl.form("price") & "'," & upl.form("fbathrooms") & "," & upl.form("hbathrooms") & "," & upl.form("bedrooms") & _ ",'" & upl.form("garage") & "','" & upl.form("address") & "',2," & upl.form("sfeet") & ");" end if response.Write(strSQL) ' Open a recordset objDBConn.execute strSQL on error resume next if err.number <> 0 then dim strPage strPage = "act_inserthouse.asp" %> <% else strFilename = empty %> <% response.redirect("dsp_main.asp") end if %>