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:
01020969
Vues:
27
Scott,

I'd recommend a strategy change.

Each site should use a unique name for the file perhaps a siteid + dtoc( datetime() ), then they can put their file whenever they want.

Your reader process just picks up and processes any files that show up in the folder and deletes them when it's done. You can then use use a timer set to 60000 to fire off a process to check for the existence of a file do be processed.

>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).
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform