Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Pdx 5 running script misbehaving

Status
Not open for further replies.

rogerpaskett

Programmer
Jul 25, 2000
3
US
I have written a script in Paradox 5 (for windows). When I run it by stepping through the code it works fine. When I run the script without breakpoints it returns erronious information.

To be exact:

It is an installation program that "unpacks" a set of files (using PAK.exe) from an install directory to the directory where application resides (C:\CUSTAPP).

After the files are unpacked I check to make sure they are there before proceding. I use the following:

If NOT fs.findFirst( sProdDir + "\\cadds.fsl") then
msgStop("Problem", "The new CADDS form is missing. "+ sErrMsg )
quitloop
endif

The script displays the message above. But, before I press the msgStop OK button, I check to see if the info is correct. It is not. The new file has been copied and is in the sProdDir + "cadds.fsl" (or "C:\CUSTAPP") directory.

Does anyone have an idea why my script works under breakpoint mode but does not work while being run?
 
Just a guess. Is the file system using write behind caching? Try a sleep(500) before the findFirst to force Paradox to yield to other Windows processes.
 
OGriofa,

Good catch! I just tested your suggestion out and it worked. I actually had it sleep for 10 seconds (SLEEP(10000)) to make sure. Thank you. I'll have to read up on Paradox and write behind caching.

Roger Paskett
 
The write behind caching is a Windows thing which is usually ok unless your system crashes a lot and you get a lot of "Index out of date" errors after restarting Paradox apps. Right click "My Computer" (or whatever), go to Properties, Performance Tab, File System button, Troubleshooting Tab.
The real problem may be that Paradox is hogging the system.
 
OK, thanks. Sounds like I could benefit from optimizing Paradox too.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top