无法使用Ms Access数据库在VB.net中更改密码

时间:2016-07-24 10:14:09

标签: vb.net ms-access

If response = MsgBoxResult.Yes Then
        con.Open()
        Dim cmd As OleDb.OleDbCommand = New OleDb.OleDbCommand("UPDATE tbl_users SET [Password] = '" & txtNewPass.Text & "' Where Username = '" & txtUsser.Text & "'", con)
        cmd.Parameters.Add("@Password", OleDb.OleDbType.VarChar).Value = txtNewPass.Text
        con.Close()
        MsgBox("Password Changse Successfully!")
                  txtOldPass.Text = ""
                  txtNewPass.Text = ""
                  txtConfPass.Text = ""
                  txtUsser.Text = ""
 End If

请帮帮我。我尝试更改现有密码虽然msgbox提示我已成功更改密码但它根本没有改变。我还检查了数据库,但密码仍然没有改变。

0 个答案:

没有答案