Friday, February 24, 2012

Dynamic Connection

I am trying to connect to multiple data sources of same type say (sql) pn different servers and run the same data flow task on all of them.

what i need to acomplish is make the connection dynamic, i tryed the sample flat file connection and i understand that i have to

1, declare a variable 'connectionstr'

2, in the connection manager properties > expression property i have to select connection string and exeression as @.[user::connectionstr']

then i am out of thoughts i know i must use FOR loop but how

even FOR loop has expression, enumerator.....

how would i point the connection string variable to a list of values(srvrname,databasename, tblname) stored in a table.

Thanks in advance...

Take a look at this example:

http://agilebi.com/cs/blogs/jwelch/archive/2007/03/21/using-for-each-to-iterate-a-resultset.aspx

Here's a search that might have some other useful samples - http://search.live.com/results.aspx?q=foreach&q1=macro:jamiet.ssis&first=1

No comments:

Post a Comment