>>It's important to note that the motion of HD heads is not under VFP's control, it's controlled by the OS. It's been a while since I looked at the mechanisms of file reading from a HD but from what I recall it's not very sophisticated. IIRC you can ask the OS to return the entire file, or (best-case scenario) you can ask it to return a portion of the file, of a given length, at a given offset from the start of the file.
>>
>>One important question is whether, given an offset from the start of a file, the OS can determine which cluster represents the start of that range, and go directly there and perform I/O to return just the required data. Or, if it has to read the whole file up to the end of the desired range and then do the equivalent of a VFP SUBSTR(). I don't know the answer to this, which has a large bearing on this discussion.
>
>It doesn't make sense to read the entire file up to the specified place - that would make a file system virtually unusable for database applications!
>
>What I guess that happens in FAT and FAT32 file systems is that the position of the required cluster(s) is obtained from the FAT, and then the required cluster(s) are read from disk.
I agree it would be more efficient to work this way but it's not obvious to me that that's the way it actually works. I haven't yet had a chance to dig up some references to HD file I/O which, as I mentioned earlier, is part of what's needed to answer this question.
Regards. Al
"Violence is the last refuge of the incompetent." -- Isaac Asimov
"Never let your sense of morals prevent you from doing what is right." -- Isaac Asimov
Neither a despot, nor a doormat, be
Every app wants to be a database app when it grows up