Guest_imported
New member
- Jan 1, 1970
- 0
I'm trying to use ADO's XML output to transfer data between two SQLServer databses. My theory was:
1. Run a SQL query against database1 using ADO, and get back a Recordset.
2. Save the Recordset to an XML file using Recordset.Save xmlFileName,adPersistXML.
3. Create a Recordset and Recordset.Open xmlFileName to get a disconnected recordset.
4. "Attach" that disconnected Recordset to a table in database2 which matches the schema of the original query.
5. Call Recordset.UpdateBatch to write the contents of the disconnected Recordset back to the table in database2.
The step I'm having trouble with is 4. How can I "attach" a disconnected Recordset to a table in a database?
sil
1. Run a SQL query against database1 using ADO, and get back a Recordset.
2. Save the Recordset to an XML file using Recordset.Save xmlFileName,adPersistXML.
3. Create a Recordset and Recordset.Open xmlFileName to get a disconnected recordset.
4. "Attach" that disconnected Recordset to a table in database2 which matches the schema of the original query.
5. Call Recordset.UpdateBatch to write the contents of the disconnected Recordset back to the table in database2.
The step I'm having trouble with is 4. How can I "attach" a disconnected Recordset to a table in a database?
sil