
copy data between sql servers using ADO VB visual basic
I believe (but could be wrong) that the only way to use ADO is to bring the
data down to a recordset, clone the record set, then save to server2. You
might look into using SQLDMO to hook into the DTS methods for copying data.
In fact, an easy way is to create a DTS package to do what you want, save as
a .vbs file, and add it to a VB project.
Quote:
> Using VB6, ADO how would I copy data between two sql servers?
> I have two connection objects, cn1 and cn2 pointing to two distinct
> sql servers.
> Let's say T1 is the table on sql server S1 and T2 is the table on sql
> server S2.
> T1 and T2 have similar table structures. If I want to copy data from
> T2 into T1, then within VB6, using ADO, how would I copy the data.
> sql1="insert into T1........"
> Help appreciated.
> Thanks