Running DTS packages in C#

2 views
Skip to first unread message

TheBigJ

unread,
Apr 25, 2006, 9:10:35 AM4/25/06
to SQL Server
Does anyone know of any good websites/resources that could help me
figure out how to alter a DTS package's Transform Data Task's
properties (specifically changing the destination table) using c#.
Thanks

Jason Cumberland

unread,
Apr 25, 2006, 8:36:17 PM4/25/06
to SQL-S...@googlegroups.com
I put a C# class together to do this that you can call from whatever.  It makes a new package with one data pump instead of altering an existing one, but it could be changed pretty easily.  I've attached the source, but here's a link.  http://qcumberland.com/download/DynamicDataFlow.cs

If you want to call this from a script task you will need to put the file in the %SYSTEMROOT%\Microsoft.NET\Framework\v2.0.50727directory as well as add it to the GAC.


Here are some of the resources I used to put it together, but searching for the object names pretty much does the trick:


:wq
DynamicDataFlow.cs

TheBigJ

unread,
Apr 26, 2006, 9:02:57 AM4/26/06
to SQL Server
Thanks so much! I will try that and let you know!!

Reply all
Reply to author
Forward
0 new messages