>Ok, but what happen when the file is very large? More than 1 MB
If you have the available memory, you can use FiletoStr(). It will suck the entire file into memory. VFP's string capacity can hold a great deal larger than 1 MB (I have created strings in excess of 1 GB for tst purposes).
If you don't have the memory available, then you have to use the LLFF as Hilmar posted. Use FSeek() to position the file pointer and FRead() to read portions of the file into memory. It will probably take longer but the some of the memory contraints don't apply.
Larry Miller
MCSD
LWMiller3@verizon.netAccumulate learning by study, understand what you learn by questioning. -- Mingjiao