Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Why DBGETPROP instead of KEY() ?
Message
De
11/10/2001 16:03:10
Robert Jewett
Q Technology Consulting
Tyler, Texas, États-Unis
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
The Mere Mortals Framework
Titre:
Why DBGETPROP instead of KEY() ?
Divers
Thread ID:
00567201
Message ID:
00567201
Vues:
44
For some reason (phase of moon, different lunch, whatever), I was using the UniqueIDSetup facility to set up a new table, and received an error that the name used for the index was not found. Poking into this, it appears that UniqueIDSetup expects the name of the Primary Key Index to be the same as the field name.

Given the expectation that one would be using unique key generation, I was curious why ' DBGETPROP(tcTable, 'Table', 'PrimaryKey') ' was used, instead of a simply Key() statement for the primary key. i.e., you could select the index returned by DBGETPROP to be certain it was the primary, and then use the KEY() function to get the name of the field.

I guess at the end of the day it is a matter of preference and habit, but was curious if there were other issues which I might have overlooked?
Répondre
Fil
Voir

Click here to load this message in the networking platform