>As I work with a form (e.g. MyForm.scx), save it and run it, I get a message that the MyForm.sct file is missing or corrupt. Upon looking in the form's directory, I discover a RandomNumber.tmp file. Renaming the file to Myform.sct allows me to open Myform.scx without incident nor loss of data. This seems to be happening to all of my forms at ever increasing frequencies, but it still happens only a small fraction of the time. I am running VFP SP4 with Windows 2000. Any suggestions?
There's been a lot of discussion of this; it's a problem under Win2K with write caching enabled on a drive. You can disable write caching for a drive in Device Manager; unfortunately, the setting doesn't "stick" at least with IDE drives, so that this has to be reset for each IDE drive following each reboot of the system. Microsoft is aware of the problem but has not issued a workaround or update to either Win2K or VFP that corrects this; my experience is that using SCSI or FireWire drives with write caching disabled isn't affected, although others report the problem with the same HA and drivers that I've used without seeing this problem.
A workaround is to use WinZip to compress and extract the SCTs whenever you finish modifying them; by compressing a form and then extracting it from the Zip, the file gets written to disk even if the system doesn't shut down normally. Copying the file does not correct the problem in the same fashion. I've not tried using EFS or NTFS file compression to get around this issue.
I use VSS for version control; the check in/check out process of VSS reliably handles the form, I suspect because the SCX and SCT are encoded as an SCA in VSS by the program SCCTEXT. If something happens to corrupt a form, I can always retrieve the latest version checked into VSS. I've been using VSS for a long time, but since this problem started to be reported, I've checked in my work more frequently, to minimize the possible effects of crashing the PC. VSS does more than just back up work; there are benefits to using it even if you're the only developer working on a project. I find the checkpointing and difference reporting to be immensely useful working alone; I may not remember exactly what changed between version 1.6.172 and 1.7.23, but I can use VSS to generate a diff report to help remind me. And an easy backup mechanism is always welcome.