Results 1 to 6 of 6
  1. #1
    Join Date
    Mar 2004
    Posts
    3

    Unanswered: dts text file import loses last record

    hi,

    i wonder if anyone of you could tell me how i can get around the following problem:

    i have text files with custom field and line delimiters (µ and ˙). i import those files in dts objects using a connection to the text file. if the last field of the last record is empty, the importer loses the last record. is there any way to change this behaviour? or is there any way to have a special text in there, so that the importer recognizes it as a null value?

    if you could help me out here it would eb highly appreciated.

    severin

  2. #2
    Join Date
    Feb 2003
    Location
    Auckland, NZ
    Posts
    150
    Sorry for asking the obvious first.

    Is there a delimiter before the empty field in the last line?
    JJ Kennedy
    Double J IT Solutions
    www.doublejit.co.nz

    VB 6, VB.NET, ASP.NET, MS SQL Server, MySQL, MS Access

  3. #3
    Join Date
    Mar 2004
    Posts
    3
    yes there is. here's an example for a non-working text:

    fdintReferatIDµfdchrBezeichnungµfdchrCodeµfdintMit arbIDµfdchrLogUserµfddatLogChangeµfdlogAktivµfdcdo AVMandantµfdcdoKanzleiIDµfdchrPMSMitarbID˙99µBetri ebsstätteµBetr.st.µ0µastanekµ29/04/96µ1µµµµ

    first line is the field names. the first line works perfectly, the "data-line" is not imported at all. the thing is, it only happens on the last record. for any record in the middle of the file, where the last field would be null, the importer works fine (field value entered as null and correct line change)

    ˙ is the line delimiter, µ the field delimiter. this makes it hard to read, but more likely to get the data imported.

    hope that made sense

    severin

  4. #4
    Join Date
    Feb 2003
    Location
    Auckland, NZ
    Posts
    150
    Have you tried putting a ˙ after the last record?
    JJ Kennedy
    Double J IT Solutions
    www.doublejit.co.nz

    VB 6, VB.NET, ASP.NET, MS SQL Server, MySQL, MS Access

  5. #5
    Join Date
    Mar 2004
    Posts
    3
    yes. this has the following result: for tables where the last field is a varchar, the ˙ is put into the field. if the last field of the table is numeric the importer gives a type mismatch error

  6. #6
    Join Date
    Feb 2004
    Location
    Hamburg, Germany
    Posts
    22
    Hi severin,

    if I counted correctly you have 10 columns in the first line (field names) and are adding 11 columns of data. Therefore, data don't match. Deleting your last µ (or adding an additional field in the first line) makes it work for me.

    kbk

    Originally posted by severin
    yes there is. here's an example for a non-working text:

    fdintReferatIDµfdchrBezeichnungµfdchrCodeµfdintMit arbIDµfdchrLogUserµfddatLogChangeµfdlogAktivµfdcdo AVMandantµfdcdoKanzleiIDµfdchrPMSMitarbID˙99µBetri ebsstätteµBetr.st.µ0µastanekµ29/04/96µ1µµµµ

    first line is the field names. the first line works perfectly, the "data-line" is not imported at all. the thing is, it only happens on the last record. for any record in the middle of the file, where the last field would be null, the importer works fine (field value entered as null and correct line change)

    ˙ is the line delimiter, µ the field delimiter. this makes it hard to read, but more likely to get the data imported.

    hope that made sense

    severin

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •