I need to copy several tables from one DB to another in SQL Server 2000, using C# (VS 2005). The call needs to be parameterized - I need to be able to pass in the name of the database to which I am going to be copying these tables.
I could use DTS with parameters, but I can't find any sample code that does this from C#.
Alternatively, I could just "drop table TableName" and "select * into TableName from SourceDB..TableName", then reconstruct the indexes etc - but that is really kludgy.
Any other ideas?
Thanks!