Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How many lines in text?

Status
Not open for further replies.

lespaul

Programmer
Feb 4, 2002
7,083
US
Prior to importing data I would like the user to verify that the number of records is correct. Other than looping through the file and incrementing the number of lines while not eof, is there another way to find out how many lines are in the text file?

Thanks! Leslie
landrews@metrocourt.state.nm.us

SELECT * FROM USERS WHERE CLUE > 0
No Rows Returned
 
ps - If I do have to loop through the file for the count, how do I then position to the first line again?

thx Leslie
landrews@metrocourt.state.nm.us

SELECT * FROM USERS WHERE CLUE > 0
No Rows Returned
 
I guess Reset(F) will put me back at the first row??

Amazing what can happen when you start to understand code!!

Leslie
landrews@metrocourt.state.nm.us

SELECT * FROM USERS WHERE CLUE > 0
No Rows Returned
 
You can load your text file into a TStringList and read Count property.

--- markus.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top