Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Using timer control to set wait time
Message
 
À
07/06/2005 11:08:34
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows 2000 SP4
Network:
Novell 6.x
Database:
Visual FoxPro
Divers
Thread ID:
01020947
Message ID:
01020954
Vues:
17
This message has been marked as the solution to the initial question of the thread.
>I'm trying to use the timer control to make my app wait a specified time before executing code. Specifically, I have a form that users across the country are using to create a file that is stored on a server in a central location (Birmingham, AL). This file has the same name everytime and is stored in the same directory. When the file is written to the server, a process starts that will read the file and delete it. This allows other sites to subsequently submit their files. The problem I have is that multiple sites could submit their file at the same time, so I need to manage this to prevent one site overwriting another site's file before the process deletes it. I had an idea to use the timer control to manage this, but I'm having some problems with the syntax. I'm trying to use the interval property and the timer event method in some combination, but to no avail. Any ideas for the best way to do this would be very much appreciated.
>
>p.s. I've tried using a "looping" structure (FOR... ENDFOR), but this is not ideal because each site has a different response time due to network issues (geographical distance from the server).

No needs for timer.
Just put the check in DO WHILE loop, soemthing like
DO WHILE .NOT. EMPTY(SYS(2000,"FullPathToFileHere"))
   DOEVENTS FORCE
ENDDO
....
BUT if the previous proccess exits w/o deleting the file this could cause an endless loop.
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform