Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Why lock() fails.
Message
De
18/10/2001 14:11:37
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Why lock() fails.
Divers
Thread ID:
00570423
Message ID:
00570423
Vues:
61
I have a forms with private data session.

Cursors are created in those forms load event with optimistics table buffering.
create cursor TEMPCURS from array aStru
cursorsetprop( 'Buffering', 5 )
Forms have a grid (invoice rows) based on this cursor.
This cursor has many relations to tables in LAN server set by SET RELATION command in grid column combobox init event.
There are a number of users in network and a number of forms in screen using
the same program.

I have a command
SET REPROCESS TO 30 SECONDS

in datasesson init.

Users can add rows to this cursor in grid and over-type combobox column contents.

I use the following command to store the entered data
SELECT TEMPCURS
IF LOCK()
  REPLACE mydata with relalias.myvalue
  unlock
 else
  messagebox('Lock Fails !!!' + str(recno()) )
  endif
Locking a temporary cursor must be always successful.
However, sometimes users get Lock Fail errors and recno() is -2

Why LOCK() command fails in this situation sometimes?
Andrus
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform