So i'm working on a little program that will uses an access database and i'm programing in vb. I'm having major issues with my UPDATE commands.
I keep getting the error messager "Syntax error in the UPDATE statement"
Dim conSurvey As New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=survey.mdb")
Dim cmdGet As New OleDbCommand("select * from Users Where Username = '" & CurrentUser.strCurrentUser & "'", conSurvey)
Dim strNewEntry As String = "Update Users Set(HDSurvey = 'true') Where Username = '" & CurrentUser.strCurrentUser.Trim.ToLower & "'"
Dim cmdUpdate As New OleDbCommand(strNewEntry, conSurvey)
Try
conSurvey.Open()
cmdUpdate.ExecuteNonQuery()
Me.Hide()
Dim newHomeForm As New frmSurvey
newHomeForm.Show()
Catch ex As Exception
MessageBox.Show(ex.Message)
Finally
conSurvey.Close()
End Try
Me.Hide()
any one got any ideas?
I keep getting the error messager "Syntax error in the UPDATE statement"
Dim conSurvey As New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=survey.mdb")
Dim cmdGet As New OleDbCommand("select * from Users Where Username = '" & CurrentUser.strCurrentUser & "'", conSurvey)
Dim strNewEntry As String = "Update Users Set(HDSurvey = 'true') Where Username = '" & CurrentUser.strCurrentUser.Trim.ToLower & "'"
Dim cmdUpdate As New OleDbCommand(strNewEntry, conSurvey)
Try
conSurvey.Open()
cmdUpdate.ExecuteNonQuery()
Me.Hide()
Dim newHomeForm As New frmSurvey
newHomeForm.Show()
Catch ex As Exception
MessageBox.Show(ex.Message)
Finally
conSurvey.Close()
End Try
Me.Hide()
any one got any ideas?
