Line 48:
Line 49: vars = pkg.Variables;
Line 50: vars["A_Variable"].Value = "SomeValue";
Line 51:
Line 52: pkgResults = pkg.Execute(null, vars, null, null, null);
here's my code
protected void Btntech_Click(object sender, EventArgs e)
{
string pkgLocation = @"C:\Users\abhishek\Documents\Visual Studio 2008\Projects\Camp\Camp\Package.dtsx";
Package pkg;
Application app;
DTSExecResult pkgResults;
Variables vars;
app = new Application();
pkg = app.LoadPackage(pkgLocation, null);
vars = pkg.Variables;
vars["A_Variable"].Value = "SomeValue";
pkgResults = pkg.Execute(null, vars, null, null, null);
if (pkgResults == DTSExecResult.Success)
Console.WriteLine("File Uploaded Successfully!");
else
Console.WriteLine("Failed, Try Again!");
}