Re: "Append From" problem

Tech-Archive recommends: Fix windows errors by optimizing your registry



Mark,

> Hmm, I think I'll have to go the "parse it myself" route, because this app
> is
> to install on users machines. Oh for the marvellously wonderful
> associative
> arrays of PHP!

Use an adaptation of the Excel selection.. APPEND FROM TYPE CSV to get all
the non-memos, then reread the file, you can use the AT( FieldBeforeMemo,
lcLine ) and the AT( FieldAfterMemo, lcLine ) to make it easier to grab the
memo data.

You may also be able to

n = alines( laData, filetostr( TheFile.CSV ) ) && if your file is less than
65000 lines. in VFP9 the array size limits have been removed.

But reliably parsing a CSV is tough if there is are commas inside quoted
fields. If you have control over the CSV generation phase you might also use
an altername delimiter string of something like ~!*

--
df - Microsoft MVP FoxPro http://www.geocities.com/df_foxpro


.



Relevant Pages

  • Re: Fastest way to read data to populate combo controls?
    ... dumping the whole thing into a CSV and parse it using VB. ... When you talk about using a CSV, Ralph, I have no clue how VB would ... The Excel macro creates a Word document with six tables: ... arrays, then writes these arrays into combos. ...
    (microsoft.public.vb.general.discussion)
  • FasterCSV heavy loads?
    ... Recently I've attempted to push a huge csv into arrays via code that ... The problem arises when the csv file is someodd 2 million lines or more. ... whats the accomplishment in that!) ...
    (comp.lang.ruby)