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

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
 
M

Michael Cole

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?
 
H

Heath P. Dillon

No as the remote system always needs the file, until the remote system
decided to change the filename etc..
 
C

Cor Ligthert[MVP]

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..
 
H

Heath P. Dillon

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
 
A

Andrew Morton

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top