谁能给我发一个用户登录和修改登录用户密码的成品(用VB做的),基本的源代码也可以。谢谢各位朋友了
我的邮箱 liuxiao11111@163.com
[此贴子已经被作者于2006-5-6 19:55:00编辑过]
下面是我的代码..调试成功..
Option Explicit
Dim iConn As ADODB.Connection
Dim iRs As ADODB.Recordset
Private Sub Command1_Click()
Set iRs = New ADODB.Recordset
Dim strSQL As String
strSQL = "SELECT * FROM user_info WHERE user_name='" & Text1.Text & "'"
iRs.Open strSQL, iConn, adOpenKeyset, adLockPessimistic, adCmdText
If iRs.RecordCount > 0 Then
iRs.Fields("user_psd") = Text2.Text
iRs.Update
MsgBox "修改成功"
iRs.Close
Else
MsgBox "没有找到此用户"
iRs.Close
Exit Sub
End If
End Sub
Private Sub Form_Load()
Dim ConnStr As String
ConnStr = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\psd.mdb"
Set iConn = New ADODB.Connection
iConn.Open ConnStr
End Sub
Private Sub Form_Unload(Cancel As Integer)
iConn.Close
Set iRs = Nothing
Set iConn = Nothing
End Sub