• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Locking and Modify

 
Steve Harper
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm a little confused about the modifying of records using the sequence Lock, Read, Modify, Unlock on the client.
My question is do you have to modify the Modify() method so that it checks that the record is locked before updating it?
This may seem like a simple question but I can find no discussion on it anywhere in the forum.
 
Peter den Haan
author
Ranch Hand
Posts: 3252
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You may, but it's not a requirement -- it's one of those areas where you have to make your own design decision.
Personally I implemented locking not in Data, but in a Connection wrapper around Data. This Connection acquired, where necessary, record locks for a Modify or Delete operation. I did this because it seemed a good idea that was easy to do, not because I thought it was necessary to successfully complete the assignment.
- Peter
 
Sai Prasad
Ranch Hand
Posts: 560
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In my design, clients cannot modify a record unless it is locked by that client.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic