读写数据库
大家好,请教高手一个问题,我本来想从一个数据库的表格读取数据,放到同一个数据库中两外一个表格中,用了两个ADODC不知道为什么总是提示出错,Option Base 1
Private Sub Command1_Click()
Dim a(17)
Form1.Adodc1.Recordset.MoveFirst
For i = 1 To 17
a(i) = Form1.Adodc1.Recordset.Fields(1)
Form1.Adodc1.Recordset.MoveNext
Next i
Form1.Adodc2.Recordset.MoveFirst
For j = 1 To 16
For i = 1 To 4
Form1.Adodc2.Recordset.Fields(i) = a(i + j - 1)
Next i
Form1.Adodc2.Recordset.MoveNext
Next j
End Sub