[RESOLVED] Update statement
Hai All.. can someone explain to me what is going on with my code? i think it's ok enough..
Code:
strSQL = "UPDATE tblUser SET User = '" & UCase(txtUser.Text) & "', fName = '" & UCase(txtfName.Text) & "', lName = '" & UCase(txtlName.Text) & "', Question = '" & UCase(comboQuestion.Text) & "', Secret = '" & UCase(txtSecret.Text) & "' WHERE User = '" & UserName & "'"
MsgBox strSQL
Set mobjCmd = New ADODB.Command
Set mobjCmd.ActiveConnection = conn
mobjCmd.CommandType = adCmdText
mobjCmd.CommandText = strSQL
mobjCmd.Execute
MsgBox "Update Successful", vbInformation, "Success"
This code is to update an existing record, the error return was:
Code:
Syntax error in update statement