Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Modification of the GeneratePrimaryKey() method
Message
From
05/04/2002 16:45:44
Jason Mesches
Ocean Systems Engineering Corporation
Carlsbad, California, United States
 
 
To
05/04/2002 02:06:39
General information
Forum:
Visual FoxPro
Category:
The Mere Mortals Framework
Miscellaneous
Thread ID:
00641251
Message ID:
00641652
Views:
22
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform