Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Most Software Stinks ...
Message
De
24/07/2002 15:11:24
 
 
À
24/07/2002 12:10:06
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00681831
Message ID:
00682222
Vues:
31
I went to your website. I really liked your article on Primary Keys. What annoys me about the article is how much work it has created for me. :-) Cutting out the garbage code I put in!

I have seen other articles similar in nature, but obviously poorly described. Such as:

Create the table "Keys" (Same as you)
Assign the values there (Same as you)
Assign the values to the data file (Same as you)

The ommission is the FLOCK() to the Keys table to ensure exclusive access and where to put the code.


I have already used that code for testing purposes. I modified it to figure out the MAX(ID) and increment by 2 for it's first use because my applications are already using Numeric IDs (my garbage code way.) This way the Keys table can be blown away, and the first time it is used it will start at the correct value.

All of my tables already use a tcTable + "_ID" field so pulling the MAX(ID) is easy. It's pretty cool to see it work with a Ctrl+Y while browsing the table!

Thanks again for a well written article and code.
Gordon de Rouyan
DC&G Consulting
Edmonton, Alberta
Email: derouyag@shaw.ca
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform