How to skip the file?

  • Hi Friends,

    I am processing some excel files from a folder using foreach loop. My requirement is when any file is having a problem in the data..like having junk data....the file should be skipped and the other files should continue. Error file data should also be roll backed.

    How to do this?

    Any suggestions would be appreciated.

    Thanks,
    Charmer

  • The most important part. How do you define the file has junk data?

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • Okay...like if the file has varchar data in a column which is supposed to be integer. Throws error while loading.

    Thanks,
    Charmer

  • Create event handler for OnError for the data flow task set Propagate to false. This will prevent the error from propagating to the foreach loop container.

    ----------------------------------------------------------------------------------------------------------------------------------------------------
    Roshan Joe

    Jeff Moden -Forum Etiquette: How to post data/code on a forum to get the best help[/url]

  • thank you.. It worked.

    Thanks,
    Charmer

Viewing 5 posts - 1 through 4 (of 4 total)

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