Re: concurrency problem with lists ("check constraint" on groups of rows)



Hi Erland!
"And it
seems a very reasonable assumption that the only piece of code that
ever
will insert rows into myGroups is this procedure. "
YES, all create-access via this proc.


"you have created a serialization point"
So
SELECT @groupID = myGroupID
FROM myGroup WITH (UPDLOCK) -- select only for lock purpose
also "locks" myGroupMember?
I suppose it would not be enough to write:
select null WITH (UPDLOCK)

This is 1. time I heard about "application lock "
I found this example:
http://www.sqlteam.com/article/application-locks-or-mutexes-in-sql-server-2005
I suppose then I should use @LockMode = 'Update'

Thank you very much. I expect to update this tread at the end of this
month, after I have released a fix and jobs had run for a while,
then I can tell, it the problem go away i production also...
Best regards
Bjorn





.