'Append from' has always been bombproof in my experience, as long as what 
you're giving it is correct. Do those problem rows have any weird non ASCII 
characters ir anything?

-- 
  Alan Bourke
  alanpbourke (at) fastmail (dot) fm

On Sun, 16 Apr 2023, at 3:35 AM, Joe Yoder wrote:
> I have an accounting system data dump that I export each year at tax time,
> I think I have always had a few records that got mangled but this year I
> would like to solve the problem.
>
> My preferred technique is to create a cursor with the fields I need to
> import along with any required place holders.  I then append from the ,CSV
> file type delimited.  This is very fast and seems to be perfect except for
> about 24 records out of 10,000.  What happens is that fields that belong in
> later positions in some records show up in the first field position.  It
> seems some records are handled as though they have a carriage return
> linefeed too early and what follows ends up at the beginning of the
> following record.
>
> I have investigated Low level file input using an fgets function to pull
> records out one at a time.  This is obviously slower and still seems to
> have the same problem.
>
> Another possible approach would be to pull the entire file into memory and
> parse everything out from there.  This will take much more time and be a
> lot of work to set up but might make sense to try.
>
> Finally I have opened the file in Excel with no problem.  Some of the
> fields that want to show up in the left field in VFP stay where they belong
> in Excel.  I don't like to add a process in another package but it may make
> sense to do so.
>
> Any wisdom will be much appreciated.
> Thanks in advance,
>
> Joe
>
>
> --- StripMime Report -- processed MIME parts ---
> multipart/alternative
>   text/plain (text body -- kept)
>   text/html
> ---
>
[excessive quoting removed by server]

_______________________________________________
Post Messages to: ProFox@leafe.com
Subscription Maintenance: https://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: https://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: https://leafe.com/archives
This message: 
https://leafe.com/archives/byMID/b76a442c-7131-42d2-9d68-3fea23864...@app.fastmail.com
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to