Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Dumb Question
Message
From
09/10/2002 15:22:22
 
 
To
09/10/2002 13:52:38
General information
Forum:
Microsoft SQL Server
Category:
Other
Title:
Miscellaneous
Thread ID:
00709424
Message ID:
00709475
Views:
17
I have tried this scheme and there always seemed to be some level of locking contention that caused an issue. The only truly reliable way to do what you ask is to write the value to, within a stored procedure:

Read the max value of your central key table.

Write the next value,

get the max value again

compare first value +1 to this value

return the current max to the calling application.


You would obviously have to decide what to do if you ran into collision.

These things are tedious to control, and a problem always seems to arise that you did not think of.
Previous
Reply
Map
View

Click here to load this message in the networking platform