Hi,
I generally name my primary key "PKID" for all tables - not unusual as I have
seen 'ID' etc.. as primary keys.
But if I create a grid from a table that contains a join and in that data set
I have need to use both primary keys on the grid (or for other reasons) there
is an issue with the primary key when doing a sort. I can't just name the
fields tableName.pkid because I need to set the "KeyField". Setting the
"KeyField" to "tableName.pkid" will cause errors because the sort routine is
expecting to find the field name in the "keys()" of the dataset record.
The fix is easy as I just need to add an alias to the second (or other join
tables) for the primary key i.e
self.addField("tableName.pkid as joinpkid")
But I wonder if it would be better and more universal to include the tableName
in the keys??
Johnf
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev
Searchable Archives: http://leafe.com/archives/search/dabo-dev
This message: http://leafe.com/archives/byMID/2171172.rmMqJGCarl@linux-12