General information
Category:
The Mere Mortals Framework
Title:
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?
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only