I need to copy multiple tables from one database to another in SQL Server 2000 using C # (VS 2005). The call must be parameterized - I need to be able to pass the name of the database to which I am going to copy these tables.
I could use DTS with parameters, but I cannot find example code that does this from C #.
Alternatively, I could just use
drop table TableName
select * into TableName from SourceDB..TableName
and then restore indexes, etc., but it is really kludgy.
Any other ideas?
Thank!
source
share