VB6.0程序:数据库中的数据在文本框中循环显示,怎么实现?
发布网友
发布时间:2023-10-02 06:54
我来回答
共1个回答
热心网友
时间:2024-12-05 02:36
Private Sub Form_Load()
Adodc1.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\db1.mdb;Persist Security Info=False"
Adodc1.RecordSource = "select name from 测试"
Adodc1.Refresh
Timer1.Interval = 10000
End Sub
Private Sub Timer1_Timer()
Text1 = Adodc1.Recordset.Fields("name")
Adodc1.Recordset.MoveNext
If Adodc1.Recordset.EOF Then Adodc1.Recordset.MoveFirst
End Sub