Solved

Microsoft.SqlServer.Dts.Runtime vs. Microsoft.SQLServer.DTSRuntimeWrap... or, "How in the heck do I call an SSIS package from C#?"

Posted on 2010-09-01
4
1,855 Views
Last Modified: 2013-11-30
I found the web page Running a Package Programmatically on the Local Computer that explains how to call an SSIS package from C#.  So far so good.

I need to reference Microsoft.SqlServer.Dts.Runtime in order to use the SSIS classes.  However, when I try to add a reference, under the .Net tab, I only see Microsoft.SQLServer.DTSRuntimeWrap, which is a little odd (case differences and no period, and what does WRAP mean???).

The "using" statement now is okay but the compiler still cannot find the SSIS classes (shown below):

Any idea what I'm supposed to reference to get these SSIS classes?

(Is there a specific SSIS library or for SQL Server 2005 was the library still called Dts?)
Error    21    The type or namespace name 'Package' could not be found (are you missing a using directive or an assembly reference?)
Error    22    The type or namespace name 'Application' could not be found (are you missing a using directive or an assembly reference?)
Error    23    The type or namespace name 'DTSExecResult' could not be found (are you missing a using directive or an assembly reference?)
Error    24    The type or namespace name 'Application' could not be found (are you missing a using directive or an assembly reference?)

Open in new window

0
Comment
Question by:ZuZuPetals
  • 2
  • 2
4 Comments
 
LVL 16

Expert Comment

by:carsRST
ID: 33582402
I believe you will need to install SQL Server components on your development machine.  After installed you should see the reference you need.
0
 
LVL 2

Author Comment

by:ZuZuPetals
ID: 33586976
I'm trying to update my server with additional software: In the advanced feature selection the Microsoft SQL Server 2005 Setup wizard says I already have the Client Components 1) Connectivity Components, Software Development Kit, and Legacy Components installed.

Plus, I already see lots of .Net components related to database in the "Add Reference" dialog box.

Are you saying I need to install the database engine itself on my development computer?
0
 
LVL 16

Expert Comment

by:carsRST
ID: 33587153
Sorry - just install SSIS then on your dev machine.  DLL should accompany.

0
 
LVL 2

Accepted Solution

by:
ZuZuPetals earned 0 total points
ID: 33587289
I figured it out by chance.  Without installing any additional stuff I tried referencing:

    Microsoft.SqlServer.ManagedDTS

because it looked like it might help.  :)   It apparently includes

    Microsoft.SqlServer.Dts.Runtime;

so my program compiles now.

Thanks for your help.
0

Featured Post

NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

JSON is being used more and more, besides XML, and you surely wanted to parse the data out into SQL instead of doing it in some Javascript. The below function in SQL Server can do the job for you, returning a quick table with the parsed data.
Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.

773 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question