Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
RLock the Header
Message
De
25/01/2006 11:09:03
 
 
À
25/01/2006 09:44:14
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 7 SP1
Database:
Visual FoxPro
Divers
Thread ID:
01090086
Message ID:
01090103
Vues:
12
>RLOCK( alias(), '0' ) will lock the header record. I intent to use this, in a certain legacy app, to have enough time to retrieve a next ID from the same table, that can be used in a new record. The rlock of the header should prevent that a concurrent user tries the same thing at the same time, and retrieves the same ID.
>
>Currently, the table is filelocked, but that action regularly frustrates users, when someone else has a record lock on one of the existing records at the same time.
>
>Has anyone here experience with this type of use of RLOCK()? Will the method be bulletproof?

Filelock is imo better than recordlock in case there is no entry yet

It is not normal that the users complain, a nextid seek and rewrite takes no time at all

You do have a separate table for the nextid's, don't you ?
Gregory
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform