Learner VBNET
Member
- Joined
- Aug 18, 2010
- Messages
- 14
- Programming Experience
- Beginner
Dim newpassword As String = Trim(Me.TextBox5.Text)
Dim SQLstring As String = "UPDATE Users SET Password ='" & newpassword & "' where ID = " & UserID
conn2 = New OleDbConnection("provider=Microsoft.ACE.OLEDB.12.0;Data source = c:\users\kevin\documents\voter enrolment database.accdb;Persist Security Info=False;")
Dim cmd As OleDbCommand
conn2.Open()
cmd = New OleDbCommand(SQLstring, conn2)
cmd.ExecuteNonQuery()
conn2.Close()
when debugging the line cmd.ExecuteNonQuery() indicates a SYNTAX error with the UPDATE SQL| statement. Please HELP. Thanks.
Dim SQLstring As String = "UPDATE Users SET Password ='" & newpassword & "' where ID = " & UserID
conn2 = New OleDbConnection("provider=Microsoft.ACE.OLEDB.12.0;Data source = c:\users\kevin\documents\voter enrolment database.accdb;Persist Security Info=False;")
Dim cmd As OleDbCommand
conn2.Open()
cmd = New OleDbCommand(SQLstring, conn2)
cmd.ExecuteNonQuery()
conn2.Close()
when debugging the line cmd.ExecuteNonQuery() indicates a SYNTAX error with the UPDATE SQL| statement. Please HELP. Thanks.
Last edited by a moderator: