I have 2 Update SQLs in my program, one for a Students table and one for a Users table. the SQL for my students table works fine and saved the new data to the database but the SQL to input my data into the users table doesn't. It doesn't give me any errors when I run the program but when I end the program and check my database nothing has changed.
Dim UpdateComm As New OleDb.OleDbCommand
Dim dbAdap As New OleDb.OleDbDataAdapter
ConnectToDB()
Dim sqlUpdateUser As String = "UPDATE usersTable SET usersTable.[Password] = " & _
Chr(39) & txtNewPass.Text & Chr(39) & _
", usersTable.Username = " & Chr(39) & Username & Chr(39) & _
" WHERE (((userTable.UserID) = " & Chr(39) & CurrentUID & Chr(39) & "));"
UpdateComm = New OleDb.OleDbCommand(sqlUpdateUser, dbConn)
UpdateComm.Parameters.AddWithValue("@p1", txtNewPass.Text)
UpdateComm.Parameters.AddWithValue("@p2", Username)
UpdateComm.ExecuteNonQuery()
Thanks.