你根本就没执行
Dim t1 As String = e.Form.Controls("textbox1").Value (t1的数据在打开窗口时已提过来了,没有问题)
Dim t2 As String = e.Form.Controls("textbox2").Value
Dim t3 As String = e.Form.Controls("textbox3").Value
Dim cmd As New SQLCommand
Dim dr As DataRow
cmd.C
If t2=t3 Then
cmd.CommandText = "Update {用户表} Set [用户密码] = '" & t2 & "' Where [用户姓名]= '" & t1 & "'"
If cmd.ExecuteNonQuery > 0 Then
Messagebox.show("更改密码成功!","提示",MessageBoxButtons.OK,MessageBoxIcon.Information)
e.Form.Close
Else
Messagebox.show("更改密码失败!","提示",MessageBoxButtons.OK,MessageBoxIcon.Information)
End If
Else
Messagebox.show("更改密码失败!","提示",MessageBoxButtons.OK,MessageBoxIcon.Information)
End If