Programming for shared access in a multi-user network questions -
using pessimistic row buffering with MULTILOCKS ON.
If I have two users editing records and issue the following TABLEUPDATE() command
TABLEUPDATE(.T.,.T.,'mytable')
the VFP Developer's Guide says that TABLEUPDATE() Releases all locks after updating the table. Does that mean that if User #1 is editing the frist record and User #2 is editing the second record, User #2 unlocks User #1's record lock on the first record?
If User #1 is editing and thus locks a record and User #1 presses the Prev or Next button which runs a command such as SKIP or SKIP -1, does that unlock the record lock for that single edited record? If User #2 presses the Prev or Next button and User #1 is editing the first record, does that affect the record lock on the record User #1 is editing?
These questions are because I get an error that reads
Record is in use by another user
When I check RLOCK() it shows .T. when User #1 starts editing a record. It shows .F. when User #2 tries to edit the same record and I put out an error message that I created. But when User #2 moves to the next record and comes back to the User #1 record and tries to edit the same record as User #1 I get the message -Record is in use by another user- after User #2 presses Edit and actually goes to a field to start editing the field in record. I want my message to appear instead of the system message. But my message only appears when RLOCK() is .F. I don't know why RLOCK() is .F. the first time User #2 tries to Edit and .T. the second time User #2 tries to edit the same record as User #1?
Thanks for some ideas. I am so close, but yet so far.
Steve Kramer
Kramer & Kramer Design
"Home of Go Cartoons"
Web Site:
www.stephenkramer.comWould you believe Far Side Lite?
More than 270 original cartoons.