Subject | RE: [firebird-support] Detect FK usage |
---|---|
Author | Chad Z. Hower |
Post date | 2004-11-10T00:12:04Z |
:: >But for edit - how can I determine easily if its already in use and
:: >then decide to allow it to be updated or not? I don't want
:: to hard code
:: >checks against every table as this will lead to bugs in the
:: application
:: >code in the future as more tables are added.
::
:: The referential integrity checks take care of this.
Only if it affects the keys. The edits would be on fields that are not part
of the key. For exampel I have an Item table, its key is ItemID. It has a
Name field - but I don't wat the user to be able to edit Name after ItemID
is referenced from another table. But since I don't want to code into my
program all the tables that iw ould have to check first - I want to somehwo
be able to detect automatically so that there wont be forgotten tables that
new FKs have been added to.
:: >then decide to allow it to be updated or not? I don't want
:: to hard code
:: >checks against every table as this will lead to bugs in the
:: application
:: >code in the future as more tables are added.
::
:: The referential integrity checks take care of this.
Only if it affects the keys. The edits would be on fields that are not part
of the key. For exampel I have an Item table, its key is ItemID. It has a
Name field - but I don't wat the user to be able to edit Name after ItemID
is referenced from another table. But since I don't want to code into my
program all the tables that iw ould have to check first - I want to somehwo
be able to detect automatically so that there wont be forgotten tables that
new FKs have been added to.