Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
add button - header locking question
Message
From
23/05/1996 12:19:25
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
add button - header locking question
Miscellaneous
Thread ID:
00001588
Message ID:
00001588
Views:
99
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
Map
View

Click here to load this message in the networking platform