2个回答
展开全部
连接数据库
Adodc1.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Persist Security Info=False;Data Source=" + App.Path + "\hkmdck\db1.mdb"
Adodc1.RecordSource = "select * from tb1"
Adodc1.Enabled = True
Adodc1.Refresh
查询当前有多少条记录;当前记录为第几条
Private Sub Command1_Click()
Label1.Caption = "数据库共有 " & Adodc1.Recordset.RecordCount & " 条记录"
Label2.Caption = "当前记录为第 " & Adodc1.Recordset.AbsolutePosition & " 条记录"
End Sub
Adodc1.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Persist Security Info=False;Data Source=" + App.Path + "\hkmdck\db1.mdb"
Adodc1.RecordSource = "select * from tb1"
Adodc1.Enabled = True
Adodc1.Refresh
查询当前有多少条记录;当前记录为第几条
Private Sub Command1_Click()
Label1.Caption = "数据库共有 " & Adodc1.Recordset.RecordCount & " 条记录"
Label2.Caption = "当前记录为第 " & Adodc1.Recordset.AbsolutePosition & " 条记录"
End Sub
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询