Updating Database in ASP

Results 1 to 3 of 3

Thread: Updating Database in ASP

  1. #1
    Join Date
    Dec 1969
    Posts
    131

    Default Updating Database in ASP

    What is wrong with my update statement? I have a form in which I want to update the fields. When I response.write my SQL, the field that I update looks like this eg....First_Name=&#039&#039. This is how my SQL looks...........<BR><BR>SQLupdate = "UPDATE tblEmployee SET "<BR>SQLupdate = SQLupdate & "First_Name=&#039" & Form_FName & "&#039,"<BR>SQLupdate = SQLupdate & "Last_Name=&#039" & Form_LName & "&#039,"<BR>SQLupdate = SQLupdate & "Company=&#039" & Form_Company & "&#039,"<BR>SQLupdate = SQLupdate & "Address_1=&#039" & Form_Address & "&#039,"<BR>SQLupdate = SQLupdate & "City=&#039" & Form_City & "&#039,"<BR>SQLupdate = SQLupdate & "State=&#039" & Form_State & "&#039,"<BR>SQLupdate = SQLupdate & "Zip_Code=&#039" & Form_ZipCode & "&#039,"<BR>SQLupdate = SQLupdate & "Email_1=&#039" & Form_Email1 & "&#039,"<BR>SQLupdate = SQLupdate & "Email_2=&#039" & Form_Email2 & "&#039,"<BR>SQLupdate = SQLupdate & "Phone_1=&#039" & Form_Phone1 & "&#039,"<BR>SQLupdate = SQLupdate & "Phone_2=&#039" & Form_Phone2 & "&#039"<BR>SQLupdate = SQLupdate & "WHERE ID=" & Form_ID<BR><BR>Please help.

  2. #2
    John Weeflaar Guest

    Default RE: Updating Database in ASP

    Add a space before WHERE in last line:<BR><BR>SQLupdate = SQLupdate & " WHERE ID=" & Form_ID<BR><BR>John

  3. #3
    Join Date
    Dec 1969
    Posts
    131

    Default RE: Updating Database in ASP (Thanks)

    Thanks John. It&#039s working perfectly.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •