StreamReader reading appended lines
Posted on 2004-09-22
I have a windows service that read text from a file when this is created and insert that data into a SQL DB. There is no problem to do this. With a fileSystemWatcher I have resolved this.
Then this file is modified appending new data, and there is the problem. With the onchanged event I detect when this file is modified but, ¿is there any way to only read the new lines appended?
If I read all the file I create duplicated rows in the Sql and this way is not valid.