Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Auto ID Field
Message
De
21/04/1998 19:25:14
 
 
À
21/04/1998 19:22:01
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00093850
Message ID:
00093851
Vues:
27
>Does anyone know how to establish a field in Visual FoxPro database which acts as an AutoID? For example when a user enters a new record this particular field will automatically increment. I know how to do this in MS Access, but not in FoxPro. Can Anyone help?
>
>Thanks,
>Bob

An easy way to do it would be to set the Default value for a Character(10) field in the table to "=SYS(2015)". This gives it a guaranteed unique value, similar to Access GUID. It's not sequential but it works great for primary keys.
------------------------------------------------
John Koziol, ex-MVP, ex-MS, ex-FoxTeam. Just call me "X"
"When the going gets weird, the weird turn pro" - Hunter Thompson (Gonzo) RIP 2/19/05
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform