密码修改界面问题
Dim rs As New ADODB.RecordsetIf txtID.Text = "" Then
MsgBox "请输入用户名", vbInformation
Exit Sub
ElseIf txtoldpwd.Text = "" Then
MsgBox "请输入旧密码", vbInformation
Exit Sub
ElseIf txtnewpwd.Text = "" Then
MsgBox "请输入新密码", vbInformation
Exit Sub
End If
rs.Open "select * from 用户 where 用户名称 = '" & Trim(txtID.Text) & "'", Con, 1, 3
If rs.EOF = True Then
MsgBox "用户不存在", vbInformation
ElseIf txtoldpwd.Text <> rs("用户密码") Then
MsgBox "旧密码有误!", vbInformation
Else
rs("用户密码") = txtnewpwd.Text
rs.Update
End If
rs.Close
用户表里有:用户名称,用户密码,用户权限
老是显示旧密码错误这一条,求解答