VB6.0中按钮点击后查询出ACCESS数据库中的信息,并显示到LABLE中,
点击按钮后,根据text内的信息,查询ACCESS数据库中相应的信息,并且显示到4个LAble中,
程序代码:
Dim cn12 As New ADODB.Connection Dim rs12 As New ADODB.Recordset cn12.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\Aging.mdb " rs12.Open "Select * From 注册 Where 用户='" & Text1.Text & "', cn12, adOpenDynamic, adLockOptimistic, adCmdText" rs12.AddNew Label1.Caption = rs!用户 Label2.Caption = rs!权限 Label4.Caption = rs!班次 Label3.Caption = rs!所属 rs12.Close Set rs12 = Nothing cn12.Close Set cn12 = Nothing Exit Sub
当前代码有问题,SELCECT那句,请问该怎么修改,