Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Question about FLOCK and REPROCESS
Message
 
 
À
15/02/2001 12:12:54
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00476348
Message ID:
00476352
Vues:
21
This is one of the SET commands that is scoped to each [private] data session. Do you have this as part of your Form class? If not, see the VFP Help topic SET DATASESSION for a list of all SET commands that are scoped to the datasession.

Next, how are you testing this? I test using 2 different private datasessions. I lock a record in a table in one session. Then try locking the record in the other DS. If I SET REPROCESS TO 5 SECONDS, VFP tries to lock for 5 seconds then stops trying. If you have SET STATUS BAR ON, you can see the locking message.

>Hello,
>
>I'm using VFP 6.0 SP3.
>I want to lock tables, then if the programm cannot lock them after 5 seconds, I want the program to continue on with an error message. When testing, I force the error to appears but it doesn't seems to retry to lock more then once. In fact, I get the error message in less the one second.
>
>I also tried with SET REPROCESS TO 5000 without success either, the messages appears very quickly.
>
>If it make any difference, tables are in buffering mode 5 and 3.
>
>
>lnDebut = seconds()
>SET REPROCESS TO 2000 SECONDS
>laTableAlias[1] = "ARINVOIC"
>laTableAlias[2] = "ARINVDTL"
>laTableAlias[3] = "ARINVFEE"
>laTableAlias[4] = "GNPARAM"
>FOR i = 1 TO 4
> llSuccess = FLOCK("&laTableAlias[i]")
> IF !llSuccess
> lcCauseExit = "cannot make lock for: " + laTableAlias[i]
> EXIT
> ENDIF
>ENDFOR
>lnfin = seconds()
>IF !llSuccess
> wait windows lcCauseExit + str(lndebut-lnfin, 8,2)
>ENDIF
>
>THANKS.
Mark McCasland
Midlothian, TX USA
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform