Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. SSIS, .net and C#

SSIS, .net and C#

Scheduled Pinned Locked Moved C#
csharphelpsql-servervisual-studiosysadmin
5 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    mecca1
    wrote on last edited by
    #1

    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()); } } }

    A M 2 Replies Last reply
    0
    • M mecca1

      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()); } } }

      A Offline
      A Offline
      aalex675
      wrote on last edited by
      #2

      Try changing: pkgLocation = @"\Serv37\wwwroot\AS-MIS\LoadBeaPayroll\LoadBeaPayroll\package.dtsx"; to pkgLocation = @".\Serv37\wwwroot\AS-MIS\LoadBeaPayroll\LoadBeaPayroll\package.dtsx";

      M 1 Reply Last reply
      0
      • A aalex675

        Try changing: pkgLocation = @"\Serv37\wwwroot\AS-MIS\LoadBeaPayroll\LoadBeaPayroll\package.dtsx"; to pkgLocation = @".\Serv37\wwwroot\AS-MIS\LoadBeaPayroll\LoadBeaPayroll\package.dtsx";

        M Offline
        M Offline
        mecca1
        wrote on last edited by
        #3

        unfortunately, I came up with the same error. I just cannot understand what I am doing incorrectly. It has to be caused by something on the server somehow. I actually have the asme code in Vb and it works just fine but the c# code does not want to work past this line. pkg = app.LoadPackage(pkgLocation, eventListener); I have tried the following for the pkglocation, they all give me the same error: Failed to open package file pkgLocation = @".\Serv37\M:\wwwroot\AS-MIS\LoadBeaPayroll\LoadBeaPayroll\package.dtsx"; pkgLocation = @"\\Serv37\M:\wwwroot\AS- MIS\LoadBeaPayroll\LoadBeaPayroll\package.dtsx"; pkgLocation = @"\Serv37\wwwroot\AS-MIS\LoadBeaPayroll\LoadBeaPayroll\package.dtsx"; pkgLocation = @"\\Serv37\wwwroot\AS-MIS\LoadBeaPayroll\LoadBeaPayroll\package.dtsx"; pkgLocation = "\\Serv37\\wwwroot\\AS-MIS\\LoadBeaPayroll\\LoadBeaPayroll\\package.dtsx"; Any more suggestions anyone?

        A 1 Reply Last reply
        0
        • M mecca1

          unfortunately, I came up with the same error. I just cannot understand what I am doing incorrectly. It has to be caused by something on the server somehow. I actually have the asme code in Vb and it works just fine but the c# code does not want to work past this line. pkg = app.LoadPackage(pkgLocation, eventListener); I have tried the following for the pkglocation, they all give me the same error: Failed to open package file pkgLocation = @".\Serv37\M:\wwwroot\AS-MIS\LoadBeaPayroll\LoadBeaPayroll\package.dtsx"; pkgLocation = @"\\Serv37\M:\wwwroot\AS- MIS\LoadBeaPayroll\LoadBeaPayroll\package.dtsx"; pkgLocation = @"\Serv37\wwwroot\AS-MIS\LoadBeaPayroll\LoadBeaPayroll\package.dtsx"; pkgLocation = @"\\Serv37\wwwroot\AS-MIS\LoadBeaPayroll\LoadBeaPayroll\package.dtsx"; pkgLocation = "\\Serv37\\wwwroot\\AS-MIS\\LoadBeaPayroll\\LoadBeaPayroll\\package.dtsx"; Any more suggestions anyone?

          A Offline
          A Offline
          aalex675
          wrote on last edited by
          #4

          Sorry, I didn't realize that Serv37 was the server name...

          1 Reply Last reply
          0
          • M mecca1

            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()); } } }

            M Offline
            M Offline
            Mbah Dhaim
            wrote on last edited by
            #5

            mecca1 wrote:

            pkgLocation = @"\Serv37\wwwroot\AS-MIS\LoadBeaPayroll\LoadBeaPayroll\package.dtsx";

            try using (i.e) pkgLocation = @"c:\wwwroot\AS-MIS\LoadBeaPayroll\LoadBeaPayroll\package.dtsx"; in local machine if file location in other machine, make sure you have shared that path and have an access right.

            dhaim ing ngarso sung tulodho, ing madyo mangun karso, tut wuri handayani. "Ki Hajar Dewantoro" in the front line gave a lead, in the middle line build goodwill, in the behind give power support

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups