Hi
I've a doubt. I don't know whether it is possible or not.
I've a very less knowledge in DTS packages.
When I execute a package in C#. it is displaying predefined GUI for showing process.
Can I've my own UI when executing DTS.
Thanks in advance.
Could you clarify what you mean by "When I execute a package in C#" and whether the question is about DTS 2000 or SSIS. This forum is about SSIS, BTW.|||
Thanks for the reply Michael
I'm using SSIS
I'm putting the C# code here
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
Package package;
ConnectionManager ConMgr;
Package p;
private void Form1_Load(object sender, EventArgs e)
{
string pkg ="Package.dtsx";
Microsoft.SqlServer.Dts.Runtime.Application app = new Microsoft.SqlServer.Dts.Runtime.Application();
p = app.LoadPackage(pkg, null);
}
private void button1_Click(object sender, EventArgs e)
{
if(p!=null)
p.Execute();
}
}
When I click on Button ie) p.Execute(); is invoked I need my own UI to see the processing . Is it possible.
Thank u
|||Of course - you need to implement event sink interface (IDTSEvents) and/or logging sink interface (IDTSLogging), and call package.Execute(...) version that takes these interfaces (pass null for all other arguments). You'll get the information about the package progress and can show the UI similar (or completely different if you choose) to the one DtExecUI shows (DtExecUI uses the same interfaces).|||
Thanks michael
It is useful
and can I know abt DtExecUI for what it is useful for?.]
|||Well, it executes the packages :)
Some people use command line and some people like to use GUI to execute packages. We provide DTEXEC and DTEXECUI for each group appropriately.|||
Thank u Michael .
Thanks for ur support to know these.
And finally one , can u provide some resource to learn , how to create custom UI. and executing package.etc
|||
Hi
I've one more doubt.
Executing package is a single threaded or multi threaded?
Can I catch the names of the currently transfering table when Executing package?
Thanks in advance.
|||Execution is multithreaded, you'll need to gather information you need from the event and pass it to the UI thread, and probably call package.Execute() on a different thread too to avoid locking up the UI.
There are many events and log information, see Books Online for details. Creative use of this information joined with the package information (e.g. transform properties) may give you most of the information you need.
I don't have any sample, sorry.|||
Thanks alot Michael.
No comments:
Post a Comment