VB6.0 做的登录请教?
用VB6.0做了一个登录的界面,用户名以及密码是存在数据库中的,想要实现,每次登录时,会判断数据库中有无该信息,在执行登录,
写了一些代码,好像有问题,实现不了,请教各位大神,
程序代码:
Private Sub Image1_Click() If Form1.Text1.Text <> "" And Form1.Text2.Text <> "" Then Dim conn1 As New ADODB.Connection Dim rs1 As New ADODB.Recordset conn1.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\Aging.mdb " 'a.mdb是ACCESS数据库保存在程序目录下 rs1.Open "select 用户 from 注册", conn1, adOpenDynamic, adLockOptimistic, adCmdText If rs1!用户 = Trim(Text1.Text) Then Form3.Show Form1.Hide rs1.Close conn1.Close End If End If If Form1.Text1.Text = "" Or Text2.Text = "" Then Form1.Image3.Visible = True End If [local]1[/local] End Sub