dbTalk Databases Forums  

runtime creation of DTS package in C#

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss runtime creation of DTS package in C# in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
juventusaurabh
 
Posts: n/a

Default runtime creation of DTS package in C# - 02-15-2006 , 07:17 PM






Thanks ppl for your help.

I actually need to create a DTS package runtime, add tasks to it (to
convert text file to sql table) and validate the data in tables.
Can anyone plz help me with runtime creation of package in C#.Net

Thanks


Reply With Quote
  #2  
Old   
Allan Mitchell
 
Posts: n/a

Default Re: runtime creation of DTS package in C# - 02-19-2006 , 09:48 AM






Hello juventusaurabh ,

In my opinion this is the wrong way to go. Why do you need to create a package
programmatically from scratch? Is this a one time operation or is this every
time?

The problem is that you are going to build a package and then run it. Whilst
this will give you maximum flexibility it will also cost you in effort.


I like the idea of being able to call a package from C# and manipulate properties
in an existing package from C# I am just unsure as to why I would want to
build a package very time from scratch and then execute it.

I guess if I need to do that then maybe doing the whole extract/import routine
in C# would be less costly.

You have changed the subject of this message.

Why not move the data to SQL Server (Staging tables) and then run some scrubbing
routines in TSQL to check the validity of the data before inserting. None
of this requires C#. What part of the package would need to be done using
..Net?

Data scrubbing becomes a lot better in SSIS.




Allan Mitchell
www.SQLDTS.com
www.SQLIS.com
www.Konesans.com

Quote:
Thanks ppl for your help.

I actually need to create a DTS package runtime, add tasks to it (to
convert text file to sql table) and validate the data in tables.
Can anyone plz help me with runtime creation of package in C#.Net
Thanks





Reply With Quote
  #3  
Old   
juventusaurabh
 
Posts: n/a

Default Re: runtime creation of DTS package in C# - 02-21-2006 , 12:06 PM



Thanks Allan,
But I actually want to run this thing on
differentinput text files everytime, for which I need to create a GUI
and let user input the path for the file.
This is the reason I wish to create DTS package at runtime.
Could you help?


Reply With Quote
  #4  
Old   
Allan Mitchell
 
Posts: n/a

Default Re: runtime creation of DTS package in C# - 02-21-2006 , 06:24 PM



Hello juventusaurabh,

So does the definition of the files change or is just the name? If it just
the name then you can do this without having to rebuild the package every
time. if it is the whole definition of the file then this is more of an
issue. What will the package do? If the only thing it does is import the
text file then I think rebilding a DTS package simply to do that is costly
with no real gain. Basically you would be using a tool that could import
a text file itself to build a package that can import a text file. See what
I mean?

Sure you can build the whole data flow yourself and a good starting point
is to save out a similar package to .vbs and then convert to C# and change
the things you need to change.



Allan Mitchell
www.SQLDTS.com
www.SQLIS.com
www.Konesans.com

Quote:
Thanks Allan,
But I actually want to run this thing on
differentinput text files everytime, for which I need to create a GUI
and let user input the path for the file.
This is the reason I wish to create DTS package at runtime.
Could you help?



Reply With Quote
  #5  
Old   
juventusaurabh
 
Posts: n/a

Default Re: runtime creation of DTS package in C# - 02-22-2006 , 12:50 PM



Thanks.
Everytime , the user could input a different file which
may have different field names. But only certain field name need to be
validated. Also, data needs to be archived into the tables for future
use(only the validated data though).

Could you provide me any links or example for this using C#(better ) or
vbs (would do).

Thanks..


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.