General discussion
April 11, 2004 at 03:13 PM
sandy

SQL Update Incorrect syntax

by sandy . Updated 22 years, 5 months ago

I am using the following code to update a record displayed in a form to an Access database but cannot get the syntax right! Any ideas as to what Ive done wrong?
Thanks in advance.
<% rs.MoveNext rs.Close END IF ELSEIF Request.Form("flag")="2" THEN SQLstmt = "UPDATE ClientTbl SET " SQLstmt = SQLstmt & "VALUES ('" & request.form("FirstName") & "','" & request.form("LastName") & "','" & request.form("Address1") & "','" & request.form("Address2") & "','" & request.form("Town") & "','" & request.form("County") & "','" & request.form("PostCode") & "','" & request.form("Tel")& "','" & request.form("Fax")& "','" & request.form("AccountNotes") & "')" SQLstmt = SQLstmt & "WHERE AcNo=" & TRIM(Request.Form("Recordid")) %>

This discussion is locked

All Comments