如何用 visual basic 6.0编写会员帐号与密码的程序

来源:百度知道 编辑:UC知道 时间:2024/05/28 07:19:38
要求帐号和密码一样才能登陆
有"会员注册""寻回密码"的功能

那很麻烦,要建数据库
找回密码我没做过,其它的都做过~

VB+ACCESS.
你又不给分,又想要程序啊?
太那个了吧

Dim constr As String
constr = "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;User ID=sa;Initial Catalog=lzx"
cnn.Open constr

Private Sub Command1_Click()
Dim sql As String
Dim rst As New ADODB.Recordset
If n = 3 Then
Unload Me
Else
sql = "select * from mima where username='" + Me.Combo1.Text + "'and password='" + Text2.Text + "'"
rst.Open sql, cnn, adOpenKeyset, adLockReadOnly
If rst.RecordCount > 0 Then '数据库中查没查到这个用户(查询到的次数)
qwe = rst.Fields(2)
Frmain.Show
username = Me.Combo1.Text
Unload Me
Else
MsgBox "您的用户名或密码有误,请核对后重新输入", 0, "警告"
Combo1.SetFocus
n = n + 1
End If
End If

End Sub

Private Sub Command2_Click()