Forum Moderators: open

Message Too Old, No Replies

Im going mad

         

stevelibby

1:04 pm on Dec 29, 2005 (gmt 0)

10+ Year Member



Hi all
I have just created an update page on my test site with the following code
<%
Dim WebID
WebID = request("WebID")
%>
<%
Dim mySQL, objRS
mySQL = "UPDATE Products SET Title= '" & request("Title") & "', Serves= '" & request("Serves") & "', Ingredients= '" & request("Ingredients") & "', CookTips= '" & request("CookTips") & "', Variation= '" & request("Variation") & "', CookDescription= '" & request("CookDescription") & "', Picture= '" & request("Picture") & "', Show= '" & request("Show") & "' WHERE WebID=WebID"
Set objRS = Server.CreateObject("ADODB.Recordset")
objRS.Open mySQL, objConn
%>

this takes the request info from form and updates where webid = webid.(Which Is an Autonumber)
i cant understand why it isnt working as it updated the whole table not the row, if i try and change the syntax it comes up as a data mismatch.
Help what do i need to put!

Easy_Coder

2:48 pm on Dec 29, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Try...

WHERE WebID=" & WebID

Im going mad

welcome to the club; ain't it great!