Pass a variable filename to a flat file connection manager.

  • Good afternoon to one and all,

    This problem is bugging me as I've done it before but cannot remember for the life of me how to do it.

    I need to pass a variable filename to a flat file connection manager in SSIS (SS 2005). I'm using an Execute SQL Task to run a query which returns the filename of the file to be processed by the flat file connection manager. Under the General options of the Execute SQL Task I have selected Single Row ResultSet - that much I remember; I think you have to set a new user variable under the ResultSet option and possibly add an expression so the flat file connection manager can pick up the file name - this is the bit I'm rather vague on.

    Could anybody point me in the right direction please?

    Thanks,

    Paul

    Keep the rubber side down and the shiny side up.

  • Create a variable such as flCnn then create your connection, give the connection the expression of the variable that you just created. 🙂

  • Sorry for the late reply but I figured it out in the end.

    Because I hadn't done this in a long time I was trying to set the variable in the Execute SQL Task rather than in the Flat File Connection Manager. Doofus or what?

    Just goes to show that it you don't use it you lose it.

    Thanks all the same,

    Paul

    Keep the rubber side down and the shiny side up.

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply