vb求助:有谁知道"修改密码"的代码怎么改???? 10
PrivateSubCommand1_Click()Dimrs_changAsNewADODB.RecordsetDimsqlAsStringIfTrim(Text1.T...
Private Sub Command1_Click()
Dim rs_chang As New ADODB.Recordset
Dim sql As String
If Trim(Text1.Text) <> Trim(Text2.Text) Then
MsgBox "密码不一致!", vbOKOnly + vbExclamation, ""
Text1.SetFocus
Text1.Text = ""
Text2.Text = ""
Else
sql = "select * from 系统管理 where 用户名='" & userID & "'"
rs_chang.Open sql, conn, adOpenKeyset, adLockPessimistic
rs_chang.Fields(1) = Text1.Text
rs_chang.Update
rs_chang.Close
MsgBox "密码修改成功", vbOKOnly + vbExclamation, ""
Unload Me
End If
End Sub
Private Sub Command2_Click()
Unload Me
End Sub 展开
Dim rs_chang As New ADODB.Recordset
Dim sql As String
If Trim(Text1.Text) <> Trim(Text2.Text) Then
MsgBox "密码不一致!", vbOKOnly + vbExclamation, ""
Text1.SetFocus
Text1.Text = ""
Text2.Text = ""
Else
sql = "select * from 系统管理 where 用户名='" & userID & "'"
rs_chang.Open sql, conn, adOpenKeyset, adLockPessimistic
rs_chang.Fields(1) = Text1.Text
rs_chang.Update
rs_chang.Close
MsgBox "密码修改成功", vbOKOnly + vbExclamation, ""
Unload Me
End If
End Sub
Private Sub Command2_Click()
Unload Me
End Sub 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询