General information
Category:
Coding, syntax & commands
Title:
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???
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only