Information générale
Catégorie:
The Mere Mortals Framework
Titre:
Why DBGETPROP instead of KEY() ?
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
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement