Reading a file that is always being appended to... best advice ....

  • Thread starter Thread starter Heath P. Dillon
  • Start date Start date
H

Heath P. Dillon

Hi,

I have to read a fixed width flat text file and upload the contents into a
SQL Server.

I have no problem reading the file and inserting the records, the problem
that I have is that the file is always being appended to by a remote system.

Is there away I can only get the new appended data each time I process the
file ?

Thanks
 
Hi,

I have to read a fixed width flat text file and upload the contents
into a SQL Server.

I have no problem reading the file and inserting the records, the
problem that I have is that the file is always being appended to by a
remote system.
Is there away I can only get the new appended data each time I
process the file ?

If you move the file, will the remote system recreate the file next time it
tries to append?
 
No as the remote system always needs the file, until the remote system
decided to change the filename etc..
 
Then read the copy of the file.

Cor

Heath P. Dillon said:
No as the remote system always needs the file, until the remote system
decided to change the filename etc..
 
The same problem will exist in reading a copy of the file, as each copy will
include the appended data.

The issue is how to read just the appended data to a file that is written to
by a remote system which is appending data every 5 seconds.

I don't want to have to open the file, and reprocess lines that I have
already processed.

Thanks
 
Heath said:
The issue is how to read just the appended data to a file that is
written to by a remote system which is appending data every 5 seconds.

I don't want to have to open the file, and reprocess lines that I have
already processed.

So you'll want to be setting FileStream.Position?

Andrew
 
Back
Top