Results 1 to 3 of 3

Thread: how to lock record in COM+

  1. #1

    Thread Starter
    New Member
    Join Date
    Sep 2001
    Posts
    3

    how to lock record in COM+

    Hi everybody,
    We just started project based on COM+ technology.
    We don't have clear understanding how to obtain lock
    of the record when several users try to manipulate with
    the same record in the sql server database
    (for example several users are trying to get customer
    object and update the same field in the database table)
    Do we need programmatically lock record for the first
    user that get ownership of the record for certain time
    or is there another way to work with the same record
    in the COM+ environment.Any ideas will be
    appreciated.
    Thanks in advance.

  2. #2
    Fanatic Member
    Join Date
    Feb 2000
    Location
    Dunmow,Essex,England
    Posts
    898
    Hi,

    This isn't a COM problem, but one of general database locking. Before you query the database, you need to decide what action is going to be performed. You should only lock the record at the point you are about to make the update. Quite often your procedure will lock the record, test the timestamp on the record if it is later than the one you are trying to write, then it means that someone else has updated since you last had the record. You would then reject the update and inform the user also releasing all locks. If you have a large N-Tier App that you are looking to use, then you should consider MTS since this can help in this kind of situation.

  3. #3
    New Member
    Join Date
    Oct 2001
    Posts
    3
    Thank you Bill,
    Your idea is really good and we actually kept in mind it.But we work in COM+ environment(actually it's new version of MTS that shiped with Windows2000).
    Could you give any idea how it could be implemented in this particular environment.
    Thanks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width