For Each Loop Problem

  • Hi Guys, I am using a For Each Loop to read Flat files. I have ck'd and dbl ck'd my file layout but I keep getting the following msg

    Warning: 0x80070003 at Detail, DTL SOURCE [2895]: The system cannot find the path specified.

    Error: 0xC020200E at Detail, DTL SOURCE [2895]: Cannot open the datafile "".

    I know the path is correct because this is the 2nd For Each in this pkg and the other one is using the same path and it works fine.

    What am I missing?

    Thank you,

    Trudye

  • Sorry, but I can't see from here what you see from there. Little hard to help.

  • I know what you mean Lynn. The problem is SSIS is not like SQL Code you can't post you code for everyone to see.

    Is there something I can tell you that would help you help me.

    Thanks for responding

    Trudye

  • Let me think on that a bit. The first idea I had was to have you zip and upload the .dtsx package, but that may not work, even though I could download it and open it in BIDS and look at, your employer may not approve.

    I am working on a article regarding SSIS, perhaps as I put it together another idea may come to mind that may be workable.

  • Warning: 0x80070003 at Detail, DTL SOURCE [2895]: The system cannot find the path specified.

    Error: 0xC020200E at Detail, DTL SOURCE [2895]: Cannot open the datafile "".

    Hi,

    Are you using variables for the properties of the ForEach Loop? The underlined part in your error, seems to indicate that it's not picking up a file name at all? What are the properties of your Enumerator configuration?

    ----------------------------------------------------------------------------------------------
    Struggling to find the question?
    http://weblogs.sqlteam.com/jeffs/archive/2008/05/13/question-needed-not-answer.aspx

  • I have had similar problems with files and directories. I am assuming that the machine that you are running on and the account it is using can see the directory and file?

    In the past I have added a script task after the directory and or file names have been construcred. This script task just contains a message box to show what SSIS thinks the name of the file is. I have made numerous speklling mistakes and also missed out the \ between directories and file names.

    Showing your package: - nothing wrong with alt print screen and opening paint and pasting.

    Hope this helps.

    Ells.

    😀

  • Thanx to everyone for chiming in I found out the Variable mapping in the For Each Loop was the culprit (it was missing).

    Now I have a truncation problem. I have enlarged the offending field in the destination table and still I get the error.

    Any Ideas??

  • You could use a derived column task, to change the field from the datasource to match the field in the data destination.

    ----------------------------------------------------------------------------------------------
    Struggling to find the question?
    http://weblogs.sqlteam.com/jeffs/archive/2008/05/13/question-needed-not-answer.aspx

  • what are you expecting to see and whar are you getting back. A few more details would usefull to help you.

    Ells.

  • Thanx so much, I solved the problem. My expression in the properties of the Connection for the For Each Loop was not set properly.

    Thanx again

Viewing 10 posts - 1 through 9 (of 9 total)

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