Bulk insert failure with Foreach Loop container

  • I am currently trying to import multiple txt files into a database using a bulk insert task and a foreach loop container.

    The bulk insert task works fine by itself. However when i place it within a Foreach loop container I get the error:

    The specified connection "Filetest" is either not valid, or points to an invalid object. To continue, specify a valid connection.

    Filetest is the name of my flat file connection. I created a variable called filefound which I have mapped to the ConnectionString expression of the file connection Manager.

    Any ides as to where i may be going wrong

  • I managed to solve this by adding a 2 script tasks. One to create a list of the files in the directory and the another to dynamically change the filename in the flat file connection at runtime.

    This is a very good article that explains what I did:

    http://denster.spaces.live.com/blog/cns!125D53A08EC75357!1210.entry?dir=Next&ph=125D53A08EC75357!1495

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

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