Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
add button - header locking question
Message
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
add button - header locking question
Divers
Thread ID:
00001588
Message ID:
00001588
Vues:
98
I have a system that required me to use pessimistic record
buffering. This is for my edit button. I simply lock the
chosen record. Noone else can get into that particular
record but it does not stop other users from editing
other records or adding new one.

To add a new record I need to lock the header so I can
do the append blank command. At the moment they choose
add I lock the header, do my append blank, and make the
command button choices be save or revert. The problem is
that if I hold onto the header lock while they are entering
the data it prevents others from adding a new record.

One solution is to do this:

rlock('0)
append blank
=tableupdate(.t.)
unlock
rlock

This locks the header just long enough to append the record,
then unlocks it and replaces the header lock with a record
lock. The problem with this approach is that the revert
command just became more complicated and other users who
might be browsing the table will now see a blank record.

Any ideas???
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform