Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Uniqueness of index is violated
Message
From
14/10/1997 12:03:10
 
 
To
14/10/1997 11:59:41
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00054468
Message ID:
00054470
Views:
29
>I have a table that has a candidate key on Name. The Name is made candidate to keep the user from entering a duplicate name, a requirement for this app. The client has complained about the error message that comes up when trying to save the record with a duplicate name. It reads:
>
>Uniqueness of index is violated
>
>and gives the cancel/suspend/ignore/help. I would much like to bypass that message with a custom one. Not only are some of the options unsavory for the app, it does some other harmful things to it.
>
>Steve

You should trap the error, e.g.
cError=on("ERROR")
lErrorflag=.f.
on error lErrorflag=.t.
**** your record saving code here
on error &cError.
if lErrorflag=.t.
**** your error trapping options
=messagebox("Cannot Save...")
endif
Edward Pikman
Independent Consultant
Previous
Reply
Map
View

Click here to load this message in the networking platform