Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6809209
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T20:03:32+00:00 2026-05-26T20:03:32+00:00

Basically i am trying to build an application that uses SSIS to run a

  • 0

Basically i am trying to build an application that uses SSIS to run a series of sql stuff.

Here is my code thus far:

        public JsonResult FireSSIS()
    {
        string x = string.Empty;
        try
        {
            Application app = new Application();                
            Package package = null;

            package = app.LoadPackage(@"C:\ft\Package.dtsx", null);

            Microsoft.SqlServer.Dts.Runtime.DTSExecResult results = package.Execute();
            if (results == Microsoft.SqlServer.Dts.Runtime.DTSExecResult.Failure)
            {
                foreach (Microsoft.SqlServer.Dts.Runtime.DtsError local_DtsError in package.Errors)
                {
                    x += string.Concat("Package Execution results: {0}", local_DtsError.Description.ToString());
                }
            }
        }

        catch (DtsException ex)
        {
           // Exception = ex.Message;
        }
        return Json(x, JsonRequestBehavior.AllowGet);
    }

Does anybody know how to pass a variable to the package itself in this way?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T20:03:32+00:00Added an answer on May 26, 2026 at 8:03 pm

    Try that:

    Microsoft.SqlServer.Dts.RunTime.Variables myVars = package.Variables;
    
    myVars["MyVariable1"].Value = "value1";
    myVars["MyVariable2"].Value = "value2";
    
    Microsoft.SqlServer.Dts.Runtime.DTSExecResult results = package.Execute(null, myVars, null, null, null);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to build something (ultimately a gem but for now an application) that
I am trying to build a raster drawing application using C# and so far
I'm currently trying to build an application that inherently needs good time synchronization across
we're trying to figure out a way to build a .NET application that can
I am trying to build an application that retrieves continuous streams of xml data
I'm trying to build a auto-logout function in a Django application. Basically, with each
I would like to build an application that uses Genetic Programming to figure out
We're trying to build an application that will describe our price list. The price
I'm trying to build a Rails application that auto-corrects the spelling of a Rails
I'm trying to build an application with WPF, application basically needs to get the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.