>Hi Ed
>
>>>>As its in the exe its impossible to debug the damn thing!
>>>
>>
>>Not true; you can run a compiled .EXE from within the VFP development environment, just like an .APP. Do the following: (etc)
>>
>I read that and thought - 'neat - that should sort me out.'
>
>sure enuff, I can indeed run the exe but when I do, the problem goes away!!
>
>I only get the problem if I run the exe from outside the vfp development environment!
>
>So now what do I do?
>
Fall back on what we did in the bad old days before we had nice IDEs - add the (im)moral equivalent of printf() statements to dump the conditions that you suspect may not be behaving properly in the runtime to a log file; get the code to misbehave, look at the log, and work from there. Once you've come up with logs from situations that clearly do not function as expected consistently, go in and step through the code in the debug environment, and compare the states of settings under the development environment to the ones found when the code failed.
I wish I could be more specific here, but my experience has been that most of the problems like this I've encountered have come as a result of things that I set as defaults in my development environment that weren't the defaults taken under the runtime. In a few instances, things I'd loaded when developing were catching and 'fixing' things so that I didn't see errors under the development environment (for example, when I started my usual VFP 5 interactive environment, I'd typically load up the SDT development environment and Ken Levy's SuperClass, and I'd release code that I'd swear on a stack of MSDN disks ran perfectly before I sent it out. And it did, as long as all my development defaults were set in place...)