Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Error file is in use
Message
De
21/06/1999 23:25:29
 
 
À
21/06/1999 05:10:39
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00232002
Message ID:
00232330
Vues:
15
>TOM has 2 views
>
>View "VA" in rowbuffering ;
>View "VB" in tablebuffering ;
>
>TOM has modified his 2 views and wants to save them
>
>He executes following group of commands : ( this group is called "G" , later in the explication)
>
>Begin Transaction
>SELECT VA
>=TABLEUPDATE( .T.,.T.)
>SELECT VB
>=TABLEUPDATE( .T.,.T.)
>End Transaction
>
>Everything go well
>
>
>Now, TOM and MIKE execute "G" in an environment ( client - servor ) at the same time ;
>
>TOM executes G one second before MIKE
>
>MIKE gets message "108 - File is in use by another user"
>
>If MIKE click on IGNORE, he can later save a second time and everything will succeed
>
>WHY does MIKE get this error ? HOW can MIKE avoid this error ?

When you put TABLEUPDATEs in a transaction, VFP locks all records involved for the duration of the transaction. This is how it guarantees the validity of the transaction. While the record is locked, no other process can change it, hence the error.

To get around this, look at SET REPROCESS. I recommend using AUTOMATIC or 0, which tells VFP to keep trying until the record is free.
Erik Moore
Clientelligence
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform