>Hi Gregory,
>
>>Tim,
>>
>>I think you will still need your pk - what if a file is put in twice
>>
>>I would - to decrease the odds
>>
>>(1) Not process any file that is say less than a minute or so old
>>(2) lock the file prior to processing it. If you cannot lock it - skip it for the moment
>>(3) after deletion of the file - verify it's no longer there
>>
>>
>>or, is there any means of processing them immediately instead of saving them to file first ?
>>
>>Success,
>
>Thanks for your comments.
>1. Is this because of the possibility it is being still written to? That seems reasonable.
>2. Good suggestion, I will see if I can learn how to lock it.
>3. I can sure do that, but would still have to keep track of it if I can't delete it.
>
>I am not processing them immediately because at any given point I may not have a connection to the Internet. This system is in a moving vehicle and the data is sent up via a WCF service. There are not many dead spots left in this location but there are some. I need the application to just create the records without delay and without the worry about the connection.
>Tim
Tim,
I understand better now
Couple of suggestions
(1) Instead of using the file system, can you sql server compact edition. Save the file to a table - delete the record after processing or use a processed field
(2) Instead of a timer, could you raise an event to the other thread ?
(3) On startup of the app, look in the table whether there are records to process
That will get rid of the file system - think this may work
Gregory