Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Attempting to lock ...
Message
 
À
21/11/2000 02:43:12
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00442021
Message ID:
00444010
Vues:
15
>My command is
>
>BEGIN TRANSACTION
>
>SELECT TabTemp
> SCAN
> SCATTER MEMVAR
>
> SELECT Table1
> SEEK M.Key
> IF !FOUND()
> APPEND BLANK
> ENDIF
> GATHER MEMVAR
>
>.....
>
> SELECT Table2
> SEEK M.Key
> IF !FOUND()
> APPEND BLANK
> ENDIF
> GATHER MEMVAR
>
>.....
>
> SELECT TabTemp
> ENDSCAN
>END TRANSACTION
>
>
>Thanks

Hi Pham,

A couple of things here. By the presence of the message, "Attempting to lock...", I would say that the REPROCESS environment setting has been set to automatic. By changing this setting (look up SET REPROCESS in the VFP docs), you can prevent the machine from pausing the way it does, and handle the situation in your own way.

Now, for the issue at hand. You have several statements in your transaction that could cause the "Attempting to lock..." scenario. The APPEND BLANK and GATHER MEMVAR commands each do what is called an "implicit" lock aginst either the table or record in question when executing. Should another user have the record in question from either Table1 or Table2 locked, or even worse have the entire table locked, you will get this message. If it is just two users running this transaction code at the same time, the message should go away almost immediately as VFP resolves the locking as each transaction completes.

As this is not the case (right?), I would ask is there any other part of the system that uses these tables, and also issuses any of the the LOCK(), RLOCK(), or FLOCK() functions? If so, it would appear that locks are getting placed, but not cleared with the UNLOCK statement freeing up the records for your transaction.
Phil
_____________________________
Phil Miles
http://www.philmiles.com
phil@philmiles.com
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform