Danny
12-05-2009, 02:53 PM
Greetings,
I am currently using VBA to query data from an AS400 system. I am pulling about 900,000 records into an ADO recordset. I then add them to an access table by looping through using something like the code below. I am wondering if there is a more efficient way to do this given the large number of records. (Also linked tables are not an option. :banghead: )
Do While Not adoRec.EOF
adoConn.Execute ("INSERT INTO Table(Field1, Field2) " & _
"VALUES('" & adoRec.Fields(0).Value & "', '" & adoRec.Fields(1).Value & "')")
adoRec.MoveNext
Loop
Thanks
I am currently using VBA to query data from an AS400 system. I am pulling about 900,000 records into an ADO recordset. I then add them to an access table by looping through using something like the code below. I am wondering if there is a more efficient way to do this given the large number of records. (Also linked tables are not an option. :banghead: )
Do While Not adoRec.EOF
adoConn.Execute ("INSERT INTO Table(Field1, Field2) " & _
"VALUES('" & adoRec.Fields(0).Value & "', '" & adoRec.Fields(1).Value & "')")
adoRec.MoveNext
Loop
Thanks