>Ha guys, I am having a problem with FSEEK, I want FSEEK to return to me the line number of the file I am on Ex: If I have 100 records how do I move the pointer to say record 1 and have fseek return 1 or record 100 and return 100?
>
>We are using FSEEK(.nimporthndl,0,1) after going to the EOF. We expected to get a return value of 100, but we get number of BYTES 36400.
That's what it is supposed to do, according to the manual.
The following commands require VFP 6 or later.
Copy your text file to a string with FileToStr().
Separate lines into array elements with alines().
This will simplify coding. alines() is also very fast.
In previous versions of VFP (or for large files, that surpass the limitations of VFP arrays), you will need memlines(), mline(), and, for fast processing, the _mline variable, instead.
HTH, Hilmar.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)