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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

suggest and strategy to read 2.600.000 in a txt file

Status
Not open for further replies.

sal0003

Programmer
Apr 5, 2010
22
IT
I need to loop all lines "line by line" in a text file wath is the best strategy and suggestion to do it?

Note:
I use VB6 classic
 

Code:
Dim strTextLine As String

Open "C:\Temp\MyFile.txt" For Input As #1
Do While Not EOF(1)   [green]' Loop until end of file.[/green]
   Line Input #1, strTextLine   [green]' Read line into variable.
   'Do what you need here[/green]
Loop
Close #1

Have fun.

---- Andy
 
Use [tt]Do Until EOF[/tt] instead of the double-negative [tt]Do While Not EOF[/tt].
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top