I am new to this thing so don't know where exactly to post this thread.
Pls help me to solve the problem.
I am having DTS package which uploads a database table in SQL server 2000. When I am executing the package manually I get the desired results. Now when I call the pacakge execution from C# directly without using stored procedures,I get a customised label which says the package was executed successfully but I dont find any changes reflected in the database.Moreover this method of calling DTS is a sychronous call which I want to avoid. I also want to catch the exact msg that a DTS package dispalys after execution.
Any help in this regard will be highly appreciated.
Thanks in advance.
You don't give much details on the package, so it is impossible to say why the changes are not in the database. Use SSIS logging to trace what is going on during the package execution: either configure the package to log to e.g. text file, or implement of IDTSLogging interfaces and supply it to package Execute method.
Regarding the sync issue, there is no async version of Execute - so you'll need to create a background thread to do the package execution without blocking UI. See if BackgroundWorker class in .NET framework suits you need - it is easy to use.
|||Loads and loads of thanks for the explanation. I will surely do that.
As u asked lemme clarify my position exactly. Right now I am having package that reads an excel sheet,updates and inserts them into some database tables. Once execution completed it sends a mail to the concerned persons along with the logfiles. When I execute them from the 2000 enterprise server I can successfully execute them.
From C# code I am calling them directly without the useage of any extended stored procedure or any OLE store procs.
I write the following lines to serve the purpose.
try
{
DTSClass package=new DTSClass();
package.loadfromSQLServer("localhost","sa","sa",null,null,null,.....);
package.execute();
}
catch(interop.COMException Ex)
{
label.text=Ex.Msg;
}
finally
{
package.uninitialize();
}
So that's the basic steps.
I am missing something that I was not supposed to. Any help in this concern will be highly appreciated
|||Ops, sorry I just realized your question was about DTS 2000. This forum is about SSIS, so I often automatically assume people talk about SSIS when they say "DTS".
I don't remember the DTS API, but I think you should get each step result to see the package result in DTS 2000.
See http://msdn2.microsoft.com/en-us/library/aa176237(SQL.80).aspx and http://support.microsoft.com/kb/240221 for details.
No comments:
Post a Comment