Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Record is in use message - only user on system
Message
De
11/09/2000 19:51:09
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Problèmes
Titre:
Record is in use message - only user on system
Divers
Thread ID:
00415204
Message ID:
00415204
Vues:
64
I received this message - record is in use by another user - upon modifying some vfp 5 code. Note that not only am i the only user on the network, there are no other vfp sessions open, and, there are no other forms open that use the same table, nor does the form use multiple data sessions.

the code does roughly the following
skips thru a table called aritrs ( a delete of the table row drives the loop). under a given condition in the loop, i attempt to do replaces in a table called sostrs.
a relation is set between aritrs and sostrs.
if for example the loop needs to process 5 rows, the first time the replace is done in sostrs it works. then the record pointer is moved in aritrs, and now the record pointer is on the new corresponding record in sostrs (i have checked this, and the record pointer is moving appropriately in sostrs.) upon executing the replace, for the 2nd time, the record is in use message is raised. this row, has never been touched in the code prior to this, ie. no locks have been issued against it. a test of rlock returns false !!

believing that a tableupdate would release any locks, i issued a function call to tableupdate(.t.,.t., 'sostrs') after the replaces are done. this was just a wild guess, i didn't think it made any sense or that it would work. but it did. this fixed the problem !!!

but i have no idea why. why would an initial replace, (which might do a row lock) cause a different row to be locked for the same user)

why would tableupdate fix this ?


thanks.
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform