>>>
>>>My suggestion would be to check out the Primary Key article on Craig's site (
www.craigberntson.com). Uniqueness is enforced by an flock() on the keys table
before obtaining the next key value (which I think is clever, Craig).
>>>
>>
>>Thanks. For the record, many people have told me they use my code to generate their PKs, often times in heavily used tables. No one has experienced any problems with the FLOCK().
>>
>
>Well, flock() is faster than rlock(), and it is only locked for a very short instance. BTW, what SET REPROCESS setting do you use for this?
My preference is 0, which is the default. If you check my code, it waits indefinately for the lock anyway.
Craig Berntson
MCSD, Microsoft .Net MVP, Grape City Community Influencer