Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
PrimaryKey() in Free Tables
Message
De
22/05/2002 14:34:26
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
CodeMine
Divers
Thread ID:
00660057
Message ID:
00660082
Vues:
11
>Am I correct in assuming that the CodeMine 7 PrimaryKey() function does not work with free tables?

Incorrect. Primary key will work just fine with free tables. You may want to check out the parameters for primary key. If you dont specify your own counter name, primarykey() will generate a counter name that includes the path to the free table. I don't like that so I generally specify my own key name when using free tables.

>or should I just create my own?

Don't do that! <s>

>And finally, if I create my own I was thinking it should be placed in the cmDataManager.AfterNew

AfterNew() is the logical place but remember it fires when you create the record so if you abandon the record, you have allocated a key. BeforeUpdate() is also a candidate for this but if you need the key for related records before saving, stick with AfterNew().
-=Gary
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform