Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Sys(2015)
Message
From
03/01/2003 15:16:30
 
 
To
03/01/2003 15:04:05
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00737786
Message ID:
00737807
Views:
25
>>I've taken over an app that uses sys(2015) to generate values for a candidate key. Users are getting "Unique index violation" errors occacionally and have to re-enter data. I cannot change the data structure to hold more characters.
>>
>>I'm replacing 2nd and 3rd chars with info from userid, in hopes of greater chance of uniqueness.
>>
>>Any better ideas for a temporary quick fix?
>
>To add to Wayne's reply, I've had good implementing key generation procs in "mid-stream" so to speak. IOW, it's relatively painless to implement in a production system. You may need to modify the structure to add the proc call to the default value, or, if the current scheme at least passes all the key generation thru a common function, just replace that function with your new one.
>
>As an alternative though, you could try trapping the error, and if it occurs, retry a different key.

Thanks,
reworking the ("bizzare") routine to manage concurrency in this app is on the todo list. It does need error trap and recovery for unique keys.
Jeff
Previous
Reply
Map
View

Click here to load this message in the networking platform