Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Retrieving data using ADO

Author  Topic 

magictech
Starting Member

44 Posts

Posted - 2003-06-15 : 00:02:24
I need help retrieving data using ADO (executing a select statement)
From a SQL Server 2000 database and directly populate a table in a SQL Server Database on a different server. Does anyone have an idea on how to accomplish this task?
Thanks in advance.


Regards


aiken
Aged Yak Warrior

525 Posts

Posted - 2003-06-15 : 01:22:47
I think you may want DTS, not ADO. Look at books online.

Cheers
-b

Go to Top of Page

mohdowais
Sheikh of Yak Knowledge

1456 Posts

Posted - 2003-06-15 : 02:51:24
ADO is the wrong tool for the job, way too slow! If both the servers are connected to the same network, you could add a linked server and run a normal INSERT or SELECT INTO, just like you would do for any other table on the same server. Or you could use DTS as aiken suggested. Try the Import/Export data wizard, should be a snap.

If the two servers are not connected, then you can use bcp. Look it up in the books online. Basically it dumps the contents of a query into a flat text file, you send the file over to the other server and import this file into the required table. Fast as a flash! Of course, things get a little complicated if you have more than one table, you'll need to create one file for each table you want to export.

Owais

Go to Top of Page
   

- Advertisement -