Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Programatically adding Project Level connections to package Expand / Collapse
Author
Message
Posted Wednesday, October 23, 2013 4:03 AM
SSC Eights!

SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!

Group: General Forum Members
Last Login: Today @ 7:37 AM
Points: 860, Visits: 2,323

I am attempting to dynamically built a collection of Pipelines for an ETL project.

They are faily simple and are basically lift and shifts of data, I've set up a pair of Project Level ADO.Net connections for Source and Destination but I cant figure out how to point the Source and destination points in the data flow task to the these.

I suspect you have to get the currently active project and assign the connectors that way using the Project.ConnectionManagerItems but cant find the method that will allow me to do this.

any help gratefully accepted.


_________________________________________________________________________
SSC Guide to Posting and Best Practices
Post #1507531
Posted Tuesday, October 29, 2013 3:32 AM
SSC Eights!

SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!

Group: General Forum Members
Last Login: Today @ 7:37 AM
Points: 860, Visits: 2,323
I've traweled through numerous articles, blogs and other sources, and it appears that you cannot programmatically add a Project level Connection Manager to a package, except through BI studio.

However, the work round is to reference the project level connection, then Instantiate a Package Level connection using the project level connection details.

It also seems that the SSIS Project Class is screwed as you cant open existing projects to add packages as it reutrns an invalid XML error when reviewing the dtproj file you pass int using the OpenProject method.

When completed and tidied up the code to generate a simple package I'll post it for to the community as a starting point for everyone to use.


_________________________________________________________________________
SSC Guide to Posting and Best Practices
Post #1509235
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse