Discussions
Categories
Choose a Product
THRUST SERVICES
CORE APPS
CE PRODUCTS
...
Quick Links
POPULAR
HELPFUL TIPS
Groups
My Links
FOR SIGNED IN MEMBERS:
Back to website
Home
TeamSite
TeamSite, LiveSite and OpenDeploy
Incrementing a PK safely
System
I'm using a inline call in my DCT to set an incremental PK ID (by checking the latest value in the DB and adding 1) for each new DCR that is to be submitted to the DB
However, I have just realised that this is not 'thread' safe.
If two authors/editors are working on DCR's simultaneously they will have both got the same ID from the inline call to the DB. eeek !
I cannot simply use a self-incrementing 'identity' (SQL server term) on the DB as I use this ID value as a foriegn key in other tables that are updated as a 'non root group' from the same DCR.
Is there no standard, safe way, of doing this ?
Many thanks again in advance
/nick
Find more posts tagged with
Comments
There are no comments yet