473,396 Members | 1,777 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Programatically running a SSIS package

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.

Sep 29 '06 #1
0 1785

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: AMAN | last post by:
Hi all, I am a newbie to SSIS.Need a solution to couple of issues I am currently facing while developing ETL in SSIS 1) Under SSIS Package Folder I have defined mappings for 17 dimensions....
0
by: fboweb.com | last post by:
Hey there! I have a DTS import package from an old SQL server that takes flat text files, does some munging on the columns using ActiveX scripts and imports those flat files to various tables. ...
0
by: rmsterling | last post by:
DSN ODBC pwd not saved when SSIS package imported SQL Server 2005 SP2 (Windows 32bit version) Implemented and FULLY tested a SSIS package with BIDs. This package uses a Data Reader object...
0
by: =?Utf-8?B?RGF2aWQgTG96emk=?= | last post by:
Howdy, Trying to run a SSIS package in my .Net app. The error is below. The connection string in the package has the complete connection with user name and password, DELPHI\OPTIMUSPRIME is my...
0
by: =?Utf-8?B?c293b3Js?= | last post by:
I create the wcf service hosted in IIS. I tried to use "Web Service Task" to call this wcf service in SSIS package. in the Http Connection manager, server url :...
3
by: Garima12 | last post by:
My goal is to convert dbf to sql server database using SSIS. The package will run periodically say once in 24 hrs. and again update the data in sql server from dbf file. For this is need to create...
2
by: pvong | last post by:
I'm new to SSIS. Can someone point me in the right direction on how to execute an SSIS package from a button OnClick? With DTS in SQL2000, I just created a job that ran the DTS package and then...
0
by: parez | last post by:
What are the different ways i can run ssis packages remotely. There are some listed on the link below. http://blogs.msdn.com/michen/archive/2007/03/22/running-ssis-package-programmatically.aspx...
0
by: pinky22 | last post by:
I am calling SSIS package from a .Net windows UI. Both SSIS & .Net app are created in 2008. The SSIS package is stored in file system. When I ran .Net app I got error- The package failed to...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.