Hi Guys,

I needed some help regarding file reading in VB 6. I am writing a program that needs to insert a record in a text file. The text file has following format..

Date, Time, Open Price, Close price

Now i need to insert record only if date is greater than last date in file.

So everytime I need to insert record, I have to open file and read sequentially and then I reach last record. This takes time.

IS there a way to read such file in binary or whatever so that i can get last record straight away or very quickly without going thru all records one by one.

If there is can anyone post a small code.

[Records in the (text) file is like -

01/01/2006, 1100, 123.33, 155.55
01/01/2006, 1130, 122.22, 134.33
01/01/2006, 1200, 112.22, 124.33
so on ... ]


Thanks a lot,

Cheers,
GR