PC Review


Reply
Thread Tools Rate Thread

Programatically running a SSIS package

 
 
=?Utf-8?B?Um9kcmlnbyBCZWxsdXNjaQ==?=
Guest
Posts: n/a
 
      29th Sep 2006
I´m using the following code to execute a SSIS package:

string pkgLocation;
Package pkg;
Microsoft.SqlServer.Dts.Runtime.Application app;
DTSExecResult pkgResults;

pkgLocation = @"C:\test\Package.dtsx";

app = new Microsoft.SqlServer.Dts.Runtime.Application();

pkg = app.LoadPackage(pkgLocation, null);

Microsoft.SqlServer.Dts.Runtime.Variable variavel = pkg.Variables["TEST"];

string sql = "SELECT DISTINCT MAX(dat_his) AS dat6_con,MAX(dat_his)-2 AS
dat4_con,MAX(dat_his)-5 AS dat1_con,MAX(dat_his)-14 AS da01_con FROM Historic
WHERE dat_his <={^2006/09/28}";

variavel.Value= sql;

pkgResults = pkg.Execute();


MessageBox.Show(pkgResults.ToString());


The execution ends without problems, and the pkgResults object receives the
value "Success". The problem is that the destination table on the existing
DataFlow Task doesn´t have any rows of data at the end of the process.

If I execute the same SSIS package in the development enviroment (SQL Server
Business Intelligence Development Studio) everything works fine, and my
destination table receives the correct data.

Does anyone have an idea of what could be the problem?

Thanks for any help.

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to call an SSIS package from ASP.NET 2.0? =?Utf-8?B?TWljaGFlbA==?= Microsoft ASP .NET 3 8th Jun 2007 07:13 AM
SSIS Package (SQL Server) Execution from Access 97 =?Utf-8?B?UHJpbmNl?= Microsoft Access VBA Modules 4 31st May 2007 12:01 PM
Trying to Eun SSIS (SQL Server) Package from Access =?Utf-8?B?UHJpbmNl?= Microsoft Access VBA Modules 1 19th May 2007 10:21 AM
Trying to Eun SSIS (SQL Server) Package from Access =?Utf-8?B?UHJpbmNl?= Microsoft Access VBA Modules 0 18th May 2007 06:02 PM
how do i run a SSIS package from an access form? =?Utf-8?B?Um9uIE4y?= Microsoft Access Form Coding 0 31st Jul 2006 11:38 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 03:27 PM.