Dynamic connection manager file name

Hi There

This should be an easy one i hope.

I need to dynamically change the file name of my destination flat file connection everytime the package runs, obviously i do not want to edit the config file everytime.

I think the best way to do this is by a script taks that sets the connection manager filename property with a variable that i dynamically populate.

Is this the right way

I just want to be sure that there is not an easier or better way to do this

Thanx



Answer this question

Dynamic connection manager file name

  • Ek9

    Right...Thanks a lot

  • Duncan-Countrywide

    Sorry to be daft, but how to do you get to the setting, when I click on the flat file source, I pull up the connection manager, which doesn't have an expressions section like the others. Could someone give me a general walk through as to how I can set the expressions property for the flat file source file name

    Thank you

  • DavidBoyCA21

    Thats is exactly what i was looking for, thanx a million Jamie
  • Clementino Mendonca - MSFT

    Yes, that sounds like a good approach. Don't use a script task though (because its not possible to do it with a script task), use a property expression (http://www.google.co.uk/search hl=en&q=ssis+expressions&meta=).

    You can parameterise the package execution by passing values in from the command-line using the /SET option.

    -Jamie



  • Qwertman

    If you select the connection for the flat file in the connection managers section of the package, the properties window will display for the properties for that connection. One of the properties is Expressions. You can probably figure it out from there.
  • Dynamic connection manager file name