Hello anybody
I am trying to update table to access database in vb.net after changing password.
But I have a problem in update error as following

Dim dbCommmand As New System.Data.OleDb.OleDbCommand
        Dim DBConnection As New System.Data.OleDb.OleDbConnection       
        DBConnection.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Users\thaeaye\Documents\Testing.mdb"      
        dbCommmand.CommandType = CommandType.Text
        dbCommmand.Connection = DBConnection
        dbCommmand.CommandText = ("UPDATE PasswordEntry SET Password='" & DatabasePasswordLogInPassword & "' WHERE AccessName = '" & PasswordMode & "';")
        MsgBox("The New Password Was successfuly Changed.", vbOKOnly, "Password Change")

Edited 5 Years Ago by TeresaTa: n/a

You did not say what the error was but please check your UPDATE Statement and check what the semicolon (;) would or should be doing there

I just started learning about database. Syntax in database command are confusing for me. In this case the error is not because of semicolon. If I write the code following, it is working. No matter what I am very thankful to you.

dbCommmand.CommandText = ("UPDATE PasswordEntry SET [Password]='" & DatabasePasswordLogInPassword & "' WHERE AccessName = '" & PasswordMode & "';")

put a TryCatch block around your Update function and see what the exact error is.
"not working" is not a valid error description and we are not able to help you then.

This article has been dead for over six months. Start a new discussion instead.