>I am getting data dump on my network from another location. How do I check if a new file has been received periodically in foxpro and is there a command that will update my table based on record key only the fields that have changed? Also will the update interfere with users already using the tables? Help appreciated
>
Start a timer; in the timer event, check if the file is present/changed (you can use the FILE() or ADIR() command to see if the file is present, and you can check the file's date/time stamp with ADIR() or FDATE() and FTIME() if the file is always there but you need to see if the file has changed since you last checked it (you'd need to track last check time to do this.
You can update records easily enough, but you need to know exactly what changed somehow. You could add a field to the incoming table that gave you a map of what changed in the record and use that for processing, or you could compare field values and update just the fields that differ. Or you could just update everything; if you are logging changes, this would seem to be easiest to do.
Rather than a sinle command, I'd probably write a small piece of code that spins through the records and updates as needed.
>
>thanks
>Nick Patel