Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Candidate Key - check before the table gets it
Message
De
12/03/2001 15:16:53
Chuck Tripi
University of Wisconsin - Milwaukee
Milwaukee, Wisconsin, États-Unis
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Candidate Key - check before the table gets it
Divers
Thread ID:
00484212
Message ID:
00484212
Vues:
61
SET DELETED OFF
SET ORDER TO main
SEEK(m.id)
IF FOUND()
Messagebox('Sorry, can not use that ID'+CHR(13)+'This ID has not been purged from the database.',64)
SET DELETED ON
SET ORDER TO main
RETURN .F.
ENDIF
SET DELETED ON
SET ORDER TO main

Does this code (in the form) looks about right for me to catch the dupe ID before the table gets the error? I am not sure if I am using the SET ORDER TO correctly (and if it does "reindex" it as well?)? The table already have SET ORDER TO MAIN from the main.prg, so would those codes mean anything in the form?

Chuck
Today is tomorrow's yesterday.
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform