Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Error file is in use
Message
From
21/06/1999 23:25:29
 
 
To
21/06/1999 05:10:39
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00232002
Message ID:
00232330
Views:
14
>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
Previous
Reply
Map
View

Click here to load this message in the networking platform