Hi, I have software that records betfair data into a csv file. I have
no access to the code, al I can adjust is the intervals at which it
records, 1sec up, and which folder/file to save the data to. Ive
written some code myself which uses streemreader to read the file into
an array, which I then reverse as I only want the last 10-15 lines
entered in the file. I fire this code using a timer. My problem is
this: If the betfair software is set to update every 2 sec, and I set
my timer to fire every 3 secs, then at some point there will be a
clash accessing the file. This is infact what happens, sometimes it
takes 10minutes upon running, or straight away. Now it knocks the
betfair software out, but not mine because ineffect it just keeps
repeating the last line.
Is there away to tell my code to wait until file is free, asumming
betfair software is opening file, updating and closing, before
reading. Im thinking that when data's bieng written to the cv file,
its flaged to say its in use. I hope this makes sense.
Regards Robert