Is this proper syntax?

Results 1 to 2 of 2

Thread: Is this proper syntax?

  1. #1
    Join Date
    Dec 1969

    Default Is this proper syntax?

    I am trying to update an already existing record in my database by adding new information to an already established userid, I can print the info out, but can not get it to update to the database. Is this a correct statement?<BR><BR>if request.form("submitformbilling") = "yes" and errormsg = "" then<BR><BR>SQL = "UPDATE * addresses SET "<BR>SQL = SQL &"billingfname="&SQLstr(billingfname)<BR>SQL = SQL &",billinglname="&SQLstr(billinglname)<BR>SQL = SQL &",billingcompany="&SQLstr(billingcompany)<BR>S QL = SQL &",billingaddress_1="&SQLstr(billingaddress_1)<BR> SQL = SQL &",billingaddress_2="&SQLstr(billingaddress_2)<BR> SQL = SQL &",billingcity="&SQLstr(billingcity)<BR>SQL = SQL &",billingstate="&SQLstr(billingstate)<BR>SQL = SQL &",billingzip="&SQLstr(billingzip)<BR>SQL = SQL &",billingphone="&SQLstr(billingphone)<BR>SQL = SQL &",billingemail="&SQLstr(billingemail)<BR>SQL = SQL &" WHERE"<BR>SQL = SQL & " addressid = "&rsselect("addressid")<BR>&#039;response.writ e SQL<BR>connection.Execute SQL <BR>end if

  2. #2
    Join Date
    Dec 1969

    Default RE: Is this proper syntax?

    I too am relatively new to ASP & SQL Server. I use UPDATES and I didn&#039;t have a * in my statement. My statement is like:<BR>"UPDATE addresses SET "<BR><BR>Try leaving off the * and see what happens.<BR><BR>Good Luck<BR>KS

Posting Permissions

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