UPDATE statement returns syntax error

Results 1 to 2 of 2

Thread: UPDATE statement returns syntax error

  1. #1
    Join Date
    Dec 1969

    Default UPDATE statement returns syntax error

    If anyone can identify why I&#039;m getting an error message from this code, please let me know.<BR><BR>I&#039;m getting the error message...<BR>"syntax error in UPDATE statement"<BR><BR>...from the following code... <BR>Set objComm = Server.CreateObject("ADODB.Command")<BR>objComm.Ac tiveConnection = strConnect<BR>objComm.CommandText = "UPDATE clients SET Password = &#039;calvin&#039; WHERE UserID LIKE &#039;jdoe&#039;"<BR>objComm.CommandType = adCmdText<BR>objComm.Execute<BR><BR>The code seems correct. What am I missing?<BR><BR>Also, I would like to substitute variable for both the password and UserID. How would I do that? Would it be something like "UPDATE clients SET Password = " & chr(39) & strPassword & chr(39) & " WHERE UserID LIKE " & chr(39) & strUserID & chr(39) & chr(34)?<BR><BR>Thank for your help,<BR>Tim

  2. #2
    Join Date
    Dec 1969

    Default password is reserved

    "UPDATE clients SET [Password] = &#039;calvin&#039; WHERE UserID LIKE &#039;jdoe&#039;"

Posting Permissions

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