Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Error: 108 File is in use by another user.
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Error: 108 File is in use by another user.
Divers
Thread ID:
00890532
Message ID:
00890532
Vues:
69
Hi, Everyboday,

We have an application that allows multiple users (40+) from their workstations to access a VFP database that is located on a network server.

Lately, the users have been complaining that they are losing data (records). As I checked the error log table that we created to track errors occoured. There are many error # 108 entries, which states that the "File is in use by another user".

When I checked the code where the savings occurs, the basic process is as follows:
set reprocess to automatic
public gnError
m.gnError = 0 
on error m.gnError = error()
begin transaction 
insert into stafile (...) values (...)
if m.gnError = 0 ;
then 
   end transaction 
else 
   rollback 
endif 
The form that excecutes that code has BufferMode set to 0.
The stafile has buffering set to 1 (no buffering).
To solve the problems I have changed the above code to the following:
set reprocess to automatic
public gnError
m.gnError = 0 
on error m.gnError = error()
use aprdb!stafile in 0 order sta_id 
begin transaction 
if rlock("0",'stafile') ;
then 
   insert into stafile (...) values (...)
   unlock record 0 in stafile 
endif 
if m.gnError = 0 ;
then 
   end transaction 
else 
   rollback 
endif 
The users are still losing data and they are really getting fed up with it.
The record count in stafile is 1.2+ mil. and fields count is 51, total field length is 421.

Any comments will be appreciated greatly!

Dawa
Dawa Tsering


"Do not let any unwholesome talk come out of your mouths,
but only what is helpful for building others up according to their needs,
that it may benefit those who listen."

- Ephesians 4:29-30 NIV

Dare to Question -- Care to Answer

Time is like water in a sponge, as long as you are willing you can always squeeze some.

--Lu Xun, Father of Modern Chinese Literature

Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform