>I am importing an ASCII file into a table. That file contains a special structures that bar code scanners are writting data into.
>
>Our import program is importing this data into our system. Before firing this process, I would like to be able to get the number of lines in that file so I can establish a thermometer. What would be the simpliest way of counting the number of lines from that file?
Michel:
I think in the help of FP 2.5, if you issue FREAD(lnHandle, 254), this will read to the end of the line. So if you code:
lnHandle=fopen("MyTextFile.txt")
=fseek(lnHandle,0) && moves to beginning of file.
lnLines=0
do while !feof(lnHandle)
=fread(lnHandle, 254)
lnLines=lnLines+1
enddo
=fclose(lnHandle)
return lnLines
HTH
Mark McCasland
Midlothian, TX USA