Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Insert a Whole Recordset Into Another

Status
Not open for further replies.

bobbarker

Programmer
Dec 20, 2001
83
GB
How can I insert records from one ADO recordset to another in one shot rather than having to loop through each record.

My two recordsets originate from two different connections - I wish to copy the records from an ODBC connection to a recordset with a SQL connection. The ODBC connection is not SQL. The fields in both recordsets that I wish to copy from and into are the same size and type.

Many thanks in advance.
 
What type of source is your ODBC connection???? Your SQL connection? If your using SQL server (maybe even Oracle) you'd have to have a way to import the data from your ODBC connection into something the SQL based connection could read. Then you might be able to try something like SELECT INTO. I know this will copy data from a table to a new table, but not sure what would happen if you attempted to SELECT INTO an existing, populated table. The operation would either append the data (Good if that's what you need to do) or overwrite existing data. Which could be very bad.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top