I have a foxpro 2.5 (for Windows) .fxp which call a .exe (lets say "exe A", compiled from VFP 6.0). "exe A" will in turn call another .exe (lets say "exe B" compiled from VPF6.0). "exe B" will in turn call another .exe (lets say "exe C" compiled from VPF6.0) All the foxpro programs and VFP .exe are commonly used by multi-users (~60).
fp2.5 fxp -> vfp6.0 exe -> vfp 6.0 exe -> vfp 6.0 exe
The problem is that I found that sometimes "exe A" call "exe B" will fail with the error message "Error reading file". This does not always happen. I suspected that there is a limitation on this kind of calling when the same .exe is used by multi-users, but I am not quite sure.
I cannot change the foxpro program to VFP 6.0 .exe because there are some other foxpro programs I need to call.
Is there any one which have this kind of experience Any comment is highly appreciated.

Call EXE problem
kgottfredsen
I personally haven't seen this problem before, but then I've never had a process like the one you describe. One way to perhaps work around this would be to try and run the executable in a loop while trapping for the error (this assumes the error is a FoxPro error and not a Window's error of course). The loop should be made with using a FOR so that there is a finite number of retries less you end up in an infinite loop which could certainly happen with a DO WHILE loop. Also, it might be prudent to include a little bit of a wait state in the loop as well - just a very short wait (.5 seconds or less) using INKEY function or Sleep API call should be sufficient.
This is all certainly a hack and certainly not an optimal solution. However, without further information regarding the cause presently being available, this may give you an interim fix until something more suitable can be formulated.
rthurber
Finally I have tried adding a WAIT statement to delay the call statement to .EXE but it didn't help. Do you have other idea Can any other expert help
Any advice is appreciated.
JonathanPerret
Thanks. Actually, the error we got is an untrappable one. We cannot use what you suggested (i.e. for loop). Anyhow, I will try to add a wait statement and see how it goes.