Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
Ton9
Starting Member
14 Posts |
Posted - 2001-04-21 : 23:56:40
|
| I am trying to update a table. I have on one page a form that gets all of its data from the DB. I can then make changes on that form then submit it to the next page which is the code I have included here. This second page should then update the DB and redirect to another page that I have specified. Problem is its not updating. I think the problem is the way I have the variables in the Update stmt line setup. I am not sure how to do this. Can someone please help!!!!! I am at my wits end. Thanks!<%Dim MLSnum, City, Price, Bedrooms, Bathrooms, Garagesize, Typeofprop, Intsize, View, Waterfront, Acres 'Grab the form data and assign it to variables...MLSnum = Trim(Request.Querystring("MLS"))City = Trim(Request.Querystring("City"))Price = Trim(Request.Querystring("Price"))Bedrooms = Trim(Request.Querystring("Bedrooms"))Bathrooms = Trim(Request.Querystring("Bathrooms"))Garagesize = Trim(Request.Querystring("Garagesize"))Typeofprop = Trim(Request.Querystring("Proptype"))Intsize = Trim(Request.Querystring("Intsize"))Waterfront = Trim(Request.Querystring("Waterfront"))View = Trim(Request.Querystring("View"))Acres = Trim(Request.Querystring("Acres"))Dim SQL SQL= "UPDATE ME.RealEstateList SET city = ''&City&'' , bedrooms = '&Bedrooms&', bathrooms = '&Bathrooms&', garagesize = '&Garagesize&', typeofprop = '&Typeofprop&', intsize = '&Intsize&', waterfront = ''&Waterfront&'', hasView = ''&View&'', acres = ''&Acres&'' WHERE propertyID = 'MLSnum'"'Response.Write(SQL) ConnOpenConn.Execute (SQL)Conn.CloseSet Conn = nothingResponse.Redirect("searchMLS.asp")%> |
|
|
|
|
|
|
|