none
Problem running SSIS from C# RRS feed

  • Question

  • I am having a problem running a SSIS Script from within a C# program.  Script was running fine and then one day it stopped running and is giving me the following errors and nothing has changed.

    2007-07-18 14:27:52,098 [1] ERROR reporting.Processor [(null)] - Problem with DTS Script

    2007-07-18 14:27:52,895 [1] ERROR reporting.Processor [(null)] - {Microsoft.SqlServer.Dts.Runtime.DtsError, Microsoft.SqlServer.Dts.Runtime.DtsError}

    The SSIS runs fine from the process on my machine, from SQL Server on my machine and from SQL Server on the server.  But when I run it from the C# executable I get the above errors.  This process also runs other SSIS scripts and they all work fine.  I am using the following code to execute the script.  Can anybody give me some ideas on how to troubleshoot this problem.

                Package package = app.LoadFromSqlServer("\\Maintenance Plans\\SCRA2", "ppntt240", "load_abc", "bcp123", null);

                DTSExecResult result = package.Execute();

                Variables vars = package.Variables;
                int rowcount = Convert.ToInt32(vars["count"].Value);
                String rowcount2 = "0000000000" + rowcount.ToString();

                string fullcnt = rowcount2.ToString().Substring(rowcount2.Length - 10, 10);


                if (result == DTSExecResult.Failure)
                {
                    Console.WriteLine("Task failed or abended");
                    log.Error("Problem with DTS Script");
                    log.Error(package.Errors);

                }
                else
                {
                    Console.WriteLine("Task ran successfully");
    Wednesday, July 18, 2007 8:06 PM