Private Sub cmdOK_Click()
Dim r As New ADODB.Recordset
Set r = DataEnv.rsadmin
Dim strSQL As String
On Error Resume Next
If r.State = adStateOpen Then r.Close
If Trim(txtnew.Text) <> Trim(txtnewqr.Text) Then
MsgBox "密码不一致!", vbOKOnly + vbExclamation, ""
txtnew.SetFocus
txtnew.Text = ""
txtnewqr.Text = ""
Else
strSQL = "select * from 系统管理表 where 用户名='" & user& "'"
r.Open strSQL, strConn, adOpenKeyset, adLockPessimistic
r.Fields(1) = txtnew.Text
r.Update
r.Close
MsgBox "密码修改成功!", vbOKOnly + vbExclamation, "提示!"
Unload Me
End If
End Sub
大家帮我看看哪个地方有问题?系统运行时 虽然提示密码修改成功 但是数据库仍然没有变更
[此贴子已经被作者于2006-5-6 19:55:00编辑过]