General information
Category:
Coding, syntax & commands
Title:
Foolproof way to insure unique incremented value
Environment versions
Network:
Windows 2003 Server
I'm looking at an old application that has an ID field for several of the tables stored in a keyseed table. When a new record is added, a process retrieves the value from the appropriate keyseed record, increments it, and updates the row. This was a fairly common technique at the time this app was written. Over the course of 10 years or so, there are probably only 3 or 4 examples where the process has failed to yield a unique value--but even that's too many. The fields are not all integers, some are actually stored as character data. They are used as candidate keys; the primary key is a SQL identity. Now that the data has been moved to SQL, what is the best way to insure this process yields no duplicates?
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only