求助ADODC的修改语句!!!!!!!!
输入 text2 为修改用户的密码 password (用户信息表,表中有user,password两项内容)
问题点数:10、回复次数:2Top
1 楼colorslife(刚才进车里时,周围的人都看我在哭,就拍窗子让你看见我!)回复于 2006-06-03 14:30:03 得分 10
text1呢,是输入user吗?
Private Sub VerifyUser()
With Adodc1
.ConnectionString = "连接字符串"
.CommandType = adCmdText
.RecordSource = " Select user,password From (用户信息表"
.Refresh
.Recordset.Filter="user='" & text1.text & "'"
if .Recordset.RecordCount>=1 then
If .Recordset("password")=Text2.text Then
msgbox "请在text2中输入新密码"
End if
msgbox "不存在此用户"
End if
End With
End sub
Private sub ModifyPwd()
If text2.text<>"" then
Adodc1.Reocrdset("password")=text2.text
Adodc1.Reocrdset.Update
msgbox "修改成功"
Else
msgbox "请在text2中输入新密码"
End if
End sub
------------
大概是这样子,你自己整理吧
Top
2 楼KinGboY16()回复于 2006-06-03 21:46:27 得分 0
呵呵,非常感谢!!!!!!!!!
Top




