Information générale
Catégorie:
Codage, syntaxe et commandes
Titre:
add button - header locking question
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
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement