error in execution of SSIS package..
-
Hi all i am trying to execute a SSIS package from C# code the code is like this.. Application app = new Application(); Package package = app.LoadPackage("d:\\Main.dtsx", null); package.ImportConfigurationFile("d:\\Main.dtsConfig"); try { DTSExecResult result = package.Execute(); } but it not giving the desired result... can anybody help me here to getin the problem.. Thanks in advance... T@SU
-
Hi all i am trying to execute a SSIS package from C# code the code is like this.. Application app = new Application(); Package package = app.LoadPackage("d:\\Main.dtsx", null); package.ImportConfigurationFile("d:\\Main.dtsConfig"); try { DTSExecResult result = package.Execute(); } but it not giving the desired result... can anybody help me here to getin the problem.. Thanks in advance... T@SU
tasumisra wrote:
but it not giving the desired result...
Why not? What is happening? Unless you provide specific details of your problem, i.e. error information, no one is going to be able to help you.
Paul Marfleet "No, his mind is not for rent To any God or government" Tom Sawyer - Rush
-
tasumisra wrote:
but it not giving the desired result...
Why not? What is happening? Unless you provide specific details of your problem, i.e. error information, no one is going to be able to help you.
Paul Marfleet "No, his mind is not for rent To any God or government" Tom Sawyer - Rush
The following is the exact message I am getting when running the application from Visual Studio 2005, trying to load a .dtsx package. I could not add a screen shot here. The code is so simple that I cannot understand what the path problem is. Failed to open package file "\Serv37\wwwroot\AS-MIS\LoadBeaPayroll\LoadBeaPayroll\package.dtsx" due to error 0x80070003 "The system cannot find the path specified.". This happens when loading a package and the file cannot be opened or loaded correctly into the XML document. This can be the result of either providing an incorrect file name was specified when calling LoadPackage or the XML file was specified and has an incorrect format. The. ,dtsx package and code are both located on the server. I can run the .dtsx package fine in BIDS and get the required result. When the code runs to the line "pkg = app.LoadPackage(pkgLocation, eventListener);" that is when I get the "Failed to open package file" error. Below is a re-posting of the actual code: using System; using System.Collections.Generic; using System.Text; using Microsoft.SqlServer.Dts.Runtime; namespace DocBeaEntry { class MyEventListener : DefaultEvents { public override bool OnError(DtsObject source, int errorCode, string subComponent, string description, string helpFile, int helpContext, string idofInterfaceWithError) { // Add application-specific diagnostics here. Console.WriteLine("Error in {0}/{1} : {2}", source, subComponent, description);return false; } } public class clsSSIS { public static void RunDTSX() { string pkgLocation; Package pkg; Application app; DTSExecResult pkgResults; MyEventListener eventListener = new MyEventListener(); pkgLocation = @"\Serv37\wwwroot\AS-MIS\LoadBeaPayroll\LoadBeaPayroll\package.dtsx"; app = new Application(); pkg = app.LoadPackage(pkgLocation, eventListener); pkgResults = pkg.Execute(null, null, eventListener, null, null);Console.WriteLine(pkgResults.ToString()); } } }