>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