Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Validation Rules
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00095820
Message ID:
00095927
Vues:
23
>>I have a table with a charater field called "ID_NAME". How do I set the index value and create a validation rule to check for uniqueness of ID_NAME. I want to display a custom error message when this rule is violated..
>>
>>Thanks,
>>
>>Bob
>
>Bob, if I understand your questions, then the index is simply on ID_NAME (INDEX on ID_NAME tag NAME). If you want the validation checked internally, set the NAME index to be PRIMARY. You can add your own validation function and message in the table designer.
>
>However, most of us (see many past threads) use an outside table which holds the last used (or next) Unique ID for each table. A function locks the record, increments the ID (by any function you choose) and then unlocks the ID table returning the new ID value. These IDs are NEVER part of any user-entered field. They are completely separate from the actual data.
>
>HTH

The SEEK command/function (5.0) supports listing the tag you want to use for searching without the need to actually change the order.

=SEEK(Value, "Alias", "IndexTag")

Steve
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform