SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Programatically adding Project Level connections to package


Programatically adding Project Level connections to package

Author
Message
Jason-299789
Jason-299789
SSCrazy
SSCrazy (2.1K reputation)SSCrazy (2.1K reputation)SSCrazy (2.1K reputation)SSCrazy (2.1K reputation)SSCrazy (2.1K reputation)SSCrazy (2.1K reputation)SSCrazy (2.1K reputation)SSCrazy (2.1K reputation)

Group: General Forum Members
Points: 2057 Visits: 3232
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
Jason-299789
Jason-299789
SSCrazy
SSCrazy (2.1K reputation)SSCrazy (2.1K reputation)SSCrazy (2.1K reputation)SSCrazy (2.1K reputation)SSCrazy (2.1K reputation)SSCrazy (2.1K reputation)SSCrazy (2.1K reputation)SSCrazy (2.1K reputation)

Group: General Forum Members
Points: 2057 Visits: 3232
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
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search