How to Count the Number of Rows in Text and ODBC Files (Btrieve)

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi.

I need the count of the number of rows within a text file.
I checked the File object but could not find a method there to do what I need.

Is there an efficient way to count the numbers of rows?
Currently all I can think of is opening the file for reading and counting
every row.
This could be a long tedious task as some of the text files have millions of
rows in them.

I also need to count the number of rows in Btrieve files. I use an ODBC for
writing to these files.

Any suggestions will be greatly appreciated.

Rita
 
Rita,

The cariage return is just a byte in a text file.

Therefore I see no better solution than just reading it line by line and
counting.

(Any other solution will mean that you have to read the complete file as
well so that won't help you).


Cor
 
Back
Top