Tuesday, February 22, 2011

Primary key on custom query table

If you start with a TableControl from one database table, and later add some other joined table, the primary key ends being the combination of both table's primary keys, so the EditRowButton and such pass an incorrect value.
Solution: define a virtual primary key for the query being the primary key of the main table, and edit button's parameter to pass that value explicitely and not the control's PK.

No comments:

Post a Comment