how to move previous recond in reading txt file

  • Thread starter Thread starter Louis
  • Start date Start date
L

Louis

Because search any string in text file is much fast then
in access table, I tried to use below code to sear text
file record. How can I move back or jump to a few record
ahead ?

'read Sequential
Open "PartFile.txt" For Input As #2
Input #2, str

Thank you in adavance.
Louis
 
Louis said:
Because search any string in text file is much fast then
in access table, I tried to use below code to sear text
file record. How can I move back or jump to a few record
ahead ?

'read Sequential
Open "PartFile.txt" For Input As #2
Input #2, str


I use the
Line Input #intFile, strBuffer
statement to sequentially read through the lines in a text
file. However, if the lines in the file are fixed length,
then you can use the Seek statement to position to any
record.

I do want to raise an argument about searching a text file
being faster than using a query to find a match in an
indexed field in a table. If what you state were a general
truth, all databases would just be text files. Either
there's more to what you want to do, or you're making a
mistake.
 
-----Original Message-----



I use the
Line Input #intFile, strBuffer
statement to sequentially read through the lines in a text
file. However, if the lines in the file are fixed length,
then you can use the Seek statement to position to any
record.

I do want to raise an argument about searching a text file
being faster than using a query to find a match in an
indexed field in a table. If what you state were a general
truth, all databases would just be text files. Either
there's more to what you want to do, or you're making a
mistake.

Thank you Marsh.
You are right if search for indexed field. But Searching
for not-indexed field, it usually takes me a minus when
the data is in networks.

Regards
Louis
 
Back
Top