TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
F D
NA
45
81k
C# and SQL Server Integration services
Dec 14 2011 3:58 PM
Hello,
I am trying to figure out the code in c sharp to execute an ssis package. I have code for a console application that will run as shown below. But I am looking for code that will execute a Windows Form Application Button.
Ex.
Click a button on a windows forms app and it will execute a specified package.
This is the console application for executing a package from a specified directory.
***************************************************************************************
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.SqlServer.Dts.Runtime;
namespace ExecPkg
{
class Program
{
static void Main(string[] args)
{
string pkgLocation;
Package pkg;
Application app;
DTSExecResult pkgResults;
pkgLocation = @"C:\TestPackage.dtsx";
app = new Application();
pkg = app.LoadPackage(pkgLocation, null);
pkgResults = pkg.Execute();
Console.WriteLine("Package has been successfully executed.\n\n" + "Package Results [" + pkgResults.ToString() + "]\n\nGoodbye!");
}
}
}
How do I convert this to windows form application code????
Please help ASAP.
Thank you.
Reply
Answers (
2
)
Pig Latin GUI
What’s the C# equivalent of C++