Subject Re: [IBO] Not IBO related, but IB related
Author Lucas Franzen
There is no count of references (I think this would slow down the
database tremendously).

You can lookup dependencies on your own in the system tables
(RDB$DEPENDENCIES, RDB$RELATION_CONSTAINTS, RDB$CONSTARINTS) but I think
it will be very tricky to get the number of related records to a given
record that way.


Why do you want to change the value at all?
A primary and foreign key should have no other purpose than
linking/joining records together thus qualifying them. It looks to me as
if you want to quantify them that way.


If you really want to do it you could also try to change the value and
catch the db exception inside the trigger code with a WHEN ... DO
construct and react in an appropriate way.

Luc.


Flipado schrieb:
>
> I hope some of you can help me on this. I have post it on mers, but
> no luck :(.
>
> This is the problem:
>
> (cut & Paste from my post in Mers)
>
> I have a problem that I don't know how to solve. I need to pick the
> info on
> a trigger is the register that I'm updating is referenced elsewhere.
> I will
> try to explain myself:
>
> TABLE A:
> Code PK
> GroupCode
>
> TABLE B,C,D,....
> SomeField REFERENCES TABLEA.Code
>
> What I need to know is there any reference to TABLE A.CODE in any of
> the
> other tables, so I can change safely the value of GroupCode.
>
> Is there any place in interbase that 'Counts' the number of
> references that
> I can use on a table?
>
> Thanks to All
> (and sorry about my english)
> (and sorry again for my off-topic message.
> I use this list every day because I'm a (two-months) newbie to IB &
> IBO : I'm a listener to the for now, but I hope I can help in a few
> months)
>
> Artur Anjos
>
>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/