add query result into table

04-15-2004, 08:08 PM
suppose rst is the recordset after query,i want to create a temporary table on server to store them for use in next procedure,how can i add the recordset into the table? thanks!

04-16-2004, 02:16 AM
1) by looping through the 'source' recordset and execting "INSERT INTO ..." against the Connection or Command objects
2) by opening the second recordset (based on the target table), looping through
the 'source' recordset and using .AddNew method
3) by inlcuding the sql statement behind the 'source' recordset into the "INSERT INTO.." and executing it, meaning:

INSERT INTO Table1 (Field1, Field2)
SELECT Field1, Field2 FROM Table2


EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum