Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Uniqueness of index is violated
Message
De
14/10/1997 12:03:10
 
 
À
14/10/1997 11:59:41
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00054468
Message ID:
00054470
Vues:
34
>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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform