Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Replace FoxPro Message with MyMessage
Message
De
11/03/2003 09:59:36
 
 
À
11/03/2003 09:49:47
Julie Ball
Gardner Publications, Inc.
Cincinnati, Ohio, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00764202
Message ID:
00764213
Vues:
20
>I would like to use my own message when a user enters a duplicated unique id instead of FoxPro's "Uniqueness of index is violated" message. How do I do that?

If you're actually talking about the Primary key, do not allow users to enter them. They should be generated by the app, and should have no real-world meaning. They should be nothing more than internal identifiers.

Anyway, are you using buffered cursors or are you using the tables directly? If you're using buffered cursors, before doing the save, you can use an SQL statement to select for fieldname = entered value. If you get _tally > 0, then it's not unique, and you can message the user.

Alan
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform