Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Modification of the GeneratePrimaryKey() method
Message
De
05/04/2002 16:45:44
Jason Mesches
Ocean Systems Engineering Corporation
Carlsbad, Californie, États-Unis
 
 
À
05/04/2002 02:06:39
Information générale
Forum:
Visual FoxPro
Catégorie:
The Mere Mortals Framework
Divers
Thread ID:
00641251
Message ID:
00641652
Vues:
23
This message has been marked as the solution to the initial question of the thread.
<snip>
>4) Questions
>============
>* Is there another way to accomplish the same result without having to overwrite the framework 7.0's
>GeneratePrimaryKey() method ?
>* Why has this not empty check being added anyway ?


Hello, Mark

We do the same thing with our Offers and OfferDetail (analogous to your OfferItems) records. We use kBizObj.CloneRecord() to accomplish the record copy. A .T. return value means the record was cloned, with a new iID value assigned in the process. All that would be left to do is replace each record's offer link with the iID of the new Offer record.

To answer your other question, "Why the change?"... I have a feeling our development team is to blame!

We noticed that when our _views_ were populated with NewID() as the default value of our PK fields in addition to the _table_ field, we were getting a "double dip" on the PK value. In other words, NewID() was firing twice... once when the view had a record appended, and once when firing GeneratePrimaryKey(). We asked Kevin to change to the framework and he obliged.

---Hope that doesn't add to much fuel to the fire!
---J
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform