Subject Re: [ib-support] Checking Referential Integrity in code
Author Claudio Valderrama C.
""Frank Wang"" <wang@...> wrote in message
> Hi All,
> I have a table customer which is being referenced by many other
> tables, I'd like to know if there is
> a generic way to check in Delphi code or SP if a certain record in the
> customer table has been referenced
> by any of those tables? example, a sql can be built based on the
> relationship defined in the .gdb and used
> to query into affected tables to see if referencing record exists, thanks
> for any help.

It's possible to detect the connection between two tables, using the same
techniques than tools like isql use to extract metadata, but you will run
into problems in real environments:

Claudio Valderrama C. - -
Independent developer
Owner of the Interbase® WebRing