March 12, 2009 at 9:12 am
Hello,
I have a flat files that come in from various sources, hence they have various formats. They are all text files though and I only need one common field that (foruntately) is always the same format.
Instead of replicating these steps, or having all of the connections in the pacakge, I'd like to have to one flat file connection and be able to change which connection manager it uses.
I keep thinking there should be a way to do this in the Script Task. Perhaps modifying a property such as System.Data.OleDB.OleDbConnection({name})=@variable+".txt"
Any ideas?
Thanks,
Peter
March 13, 2009 at 7:35 am
pcapazzi (3/12/2009)
Hello,I have a flat files that come in from various sources, hence they have various formats. They are all text files though and I only need one common field that (foruntately) is always the same format.
Instead of replicating these steps, or having all of the connections in the pacakge, I'd like to have to one flat file connection and be able to change which connection manager it uses.
I keep thinking there should be a way to do this in the Script Task. Perhaps modifying a property such as System.Data.OleDB.OleDbConnection({name})=@variable+".txt"
Any ideas?
Thanks,
Peter
Peter,
I don't understand how flat file connection relates to OleDbConnection. Can you elaborate what property you want to be able to change?
If you want to control connection manager properties, you can do it with expressions defined on the connection manager. You can use variables in your expression and use a script to modify the related variable.
March 16, 2009 at 2:51 pm
You can ditch the dbconnection object I suggested. It was just to get the general idea across of changing a source. My goal is to programatically swap one of the (text file) Connection Managers for another.
Say if you received phones books from two different sources. And in your connection managers window you have yellowbook, whitebook, and a dummybook. Say the yellow book is a delimited text file while the white book is fixed width. The dummy book can be either but doesn't matter as it's only there as a placeholder
In the package the dummybook would be the text file source and during the execution I'd like to displace that input component with yellowbook and then whitebook.
Can a script task handle this?
March 16, 2009 at 2:58 pm
pcapazzi (3/16/2009)
You can ditch the dbconnection object I suggested. It was just to get the general idea across of changing a source. My goal is to programatically swap one of the (text file) Connection Managers for another.Say if you received phones books from two different sources. And in your connection managers window you have yellowbook, whitebook, and a dummybook. Say the yellow book is a delimited text file while the white book is fixed width. The dummy book can be either but doesn't matter as it's only there as a placeholder
In the package the dummybook would be the text file source and during the execution I'd like to displace that input component with yellowbook and then whitebook.
Can a script task handle this?
Which input component in particular you are referring to?
March 16, 2009 at 3:02 pm
Flat File
March 16, 2009 at 3:08 pm
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply