Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Foolproof way to insure unique incremented value
Message
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Foolproof way to insure unique incremented value
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01387318
Message ID:
01387318
Views:
129
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
Map
View

Click here to load this message in the networking platform