UPDATE statement returns syntax error
If anyone can identify why I'm getting an error message from this code, please let me know.
I'm getting the error message...
"syntax error in UPDATE statement"
...from the following code...
Set objComm = Server.CreateObject("ADODB.Command")
objComm.ActiveConnection = strConnect
objComm.CommandText = "UPDATE clients SET Password = 'calvin' WHERE UserID LIKE 'jdoe'"
objComm.CommandType = adCmdText
The code seems correct. What am I missing?
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)?
Thanks for your help,