Flat File source not recognizing {CR}{LF}

  • Using VS 2017

    I have a bunch of "^" delimited flat files i am importing into SQL server 2019 tables.  The files are formatted identically as far as i can see.  One of the files fails.  The flat file source returns this message "The specified header or data row delimiter "{CR}{LF}" is not found after scanning ...".   The {CR}{LF} is there.  I've attached a screen shot from NotePad++ that clearly shows the {CR}{LF}.  All of the other files look identical in NotePad++ and process successfully.

    I have also attached a screen shot of the flat file source configuration.

    I have Googled this can find no solution.  Anybody else had deal with this?

    Thank you!

    Jonathan

    Attachments:
    You must be logged in to view attached files.
  • I think I've seen this when one of the data rows has a different number of columns that the header row, or when the connection manager was created using a a file with a different number of columns than the problem file.

    Maybe try opening the problem file in Excel so you can see the columns more easily and make sure all rows have the same number of columns, then compare with a known good file to see if the two files have the same number of columns.

  • Can you Preview the file, or does the error happen before that?

    The absence of evidence is not evidence of absence.
    Martin Rees

    You can lead a horse to water, but a pencil must be lead.
    Stan Laurel

  • As Palandri mentions, I suspect that (at least) one of the rows doesn't have enough columns or too many. As a result the import fails as the CRLF isn't found where it's expected.

    Thom~

    Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
    Larnu.uk

  • and sometimes being (or not) unicode also gives the same error - many times this happens because someone edited or created a file manually for testing and didn't set it as per the package definition

  • Thanks everyone for your help!  I am going to investigate your suggestions today and reply with what i find.

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

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