Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Creating primary key from imported data
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00066546
Message ID:
00066654
Vues:
38
>>The basic 'New ID' procedure for any VFP app assumes following:
>>1. You have 'setup' table with two fields: tablename C, counter I.
>>2. Any time you want to create new unique ID, you go to the table, search for appropriate 'tablename', lock the record, return 'counter' value, increment counter (to prepare for next ID) and unlock the record.
>>This is robust way, but if you have simpler (exclusive usage) situation you could use something simpler, e.g. even use RECNO() to fill primarykey field.
>
>I am looking for a simpler, exclusive usage answer. How would I use RECNO(). That's the first thing I tried. I created a new numeric field in my temporary import table and in the Default Value it put RECNO(). It didn't work though...when I imported the data this field remained empty.
>
>Jeff

I just tested and it should work.
Edward Pikman
Independent Consultant
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform