|
-
Oct 29th, 2001, 10:10 PM
#1
Thread Starter
New Member
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.
-
Nov 1st, 2001, 11:23 AM
#2
Fanatic Member
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.
-
Nov 1st, 2001, 12:21 PM
#3
New Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|