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. Calling SSIS package from c#

Calling SSIS package from c#

Scheduled Pinned Locked Moved C#
csharpdatabasevisual-studiohelpsql-server
2 Posts 2 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.
  • K Offline
    K Offline
    KhandelwalA
    wrote on last edited by
    #1

    I am developing a windows application, In this application I am trying to call a SSIS package from C# code. The code is as follows:-

    Microsoft.SqlServer.Dts.Runtime.Application app=new Microsoft.SqlServer.Dts.Runtime.Application();
    Package package = null;
    string pkgloctn;
    pkgloctn = @"E:\XXXXX\XXXXX\Package.dtsx";
    package = app.LoadPackage(pkgloctn, null);
    package.Variables["User::FileName"].Value = txtCustSupport.Text.Trim();
    Microsoft.SqlServer.Dts.Runtime.DTSExecResult results = package.Execute();

    on line number 6, I am getting following error message:- "The package failed to load due to error 0xC0011008 "Error loading from XML. No further detailed error information can be specified for this problem because no Events object was passed where detailed error information can be stored.". This occurs when CPackage::LoadFromXML fails." My database is in SQL 2012 and SSIS Package is developed in 'Microsoft Visual Studio 2010 Shell' with framework 3.5 I am developing windows application in VS 2012 with framework 3.5. Kindly suggest

    Z 1 Reply Last reply
    0
    • K KhandelwalA

      I am developing a windows application, In this application I am trying to call a SSIS package from C# code. The code is as follows:-

      Microsoft.SqlServer.Dts.Runtime.Application app=new Microsoft.SqlServer.Dts.Runtime.Application();
      Package package = null;
      string pkgloctn;
      pkgloctn = @"E:\XXXXX\XXXXX\Package.dtsx";
      package = app.LoadPackage(pkgloctn, null);
      package.Variables["User::FileName"].Value = txtCustSupport.Text.Trim();
      Microsoft.SqlServer.Dts.Runtime.DTSExecResult results = package.Execute();

      on line number 6, I am getting following error message:- "The package failed to load due to error 0xC0011008 "Error loading from XML. No further detailed error information can be specified for this problem because no Events object was passed where detailed error information can be stored.". This occurs when CPackage::LoadFromXML fails." My database is in SQL 2012 and SSIS Package is developed in 'Microsoft Visual Studio 2010 Shell' with framework 3.5 I am developing windows application in VS 2012 with framework 3.5. Kindly suggest

      Z Offline
      Z Offline
      ZurdoDev
      wrote on last edited by
      #2

      A simple google search of the error yields many results. The first one has several possible reasons for that error, https://social.msdn.microsoft.com/Forums/sqlserver/en-US/34366c41-211d-4ad9-a495-956bac3ba3df/the-package-failed-to-load-due-to-error-0xc0011008[^]

      There are only 10 types of people in the world, those who understand binary and those who don't.

      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