>>>>I wrote a line of code in a form, and when I saved, it erased it! I tried again.. same thing!!!
>>>>I am using VFP6 SP5 with MDAC2.5 if that is useful...
>>>
>>>David,
>>>
>>>I've run into this apparent VFP bug every once in a while, on versions through SP4 (haven't tried SP5). "I could'a sworn I saved those changes!" My recollection is that there were always multiple open method windows, and the problem seems to occur more frequently when multiple forms or classes are open, but I'm not certain - this is just a vague impression. When it happens (quite infrequently) I switch into hyper-cautious mode: start a fresh VFP session ASAP, carefully open only one object at a time, save after each change, close and reopen to confirm that the changes stuck. I don't recall ever seeing this behavior persist in a fresh VFP session.
>>>
>>>Mike
>>
>>
>>As it occured to me, it happens when the class is in memory. (Frequently due to an error or other reason) So, if I issued clear all, this problem had gone away.
>>So, I put a clear all command into my program endline. It is executed if it runs under development enviroment.
>>
>>bb
>
>
>And I forgot the most impotant thing. If you open the vcx files you can see that the code is in it!!!!
>So, I concluded, that I can re-call the code. When you think that something is missing but it should be there, close the method code without saving and make a CLEAR ALL and then RECOMPILE ALL the project. Usually it brings back the disappeared code.
>
>bb
Amazing! I'll have to try that trick next time I run across this problem - if it's worth the trouble. I've used CLEAR ALL as one of the final cleanup steps in various incarnations of my main programs, but I prefer to avoid it unless there's no alternative. CLEAR ALL seems a bit heavy-handed if your trying to be polite about restoring the environment.
Mike