
Adodc1.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\library.mdb;Persist Security Info =false"Adodc1.CommandType = adCmdTextAdodc1.RecordSource = "select * from A2" '当前文件夹中library库A2表中数据Adodc1.RefreshAdodc2.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\mybook.mdb;Persist Security Info =false"Adodc2.CommandType = adCmdTextAdodc2.RecordSource = "select * from A3" 当前文件夹中mybook库A3表数据Adodc2.RefreshIf Not Adodc1.Recordset.BOF Then Adodc1.Recordset.MoveFirst 'A2表中数据集指针到最前面If Not Adodc2.Recordset.EOF Then Adodc2.Recordset.MoveLast 'A3数据集指针到最后For i = 1 To Adodc1.Recordset.RecordCount Adodc2.Recordset.AddNew 'A3添加空数据 Adodc2.Recordset.Fields(0).Value = Adodc1.Recordset.Fields(0).Value '将A2当前指针的数据给A3新加数据表中 Adodc2.Recordset.Update 'A3更新 Adodc1.Recordset.MoveNext 'A2指向下一条继续Next i
