Page 1 of 1

detect foreign keys and referenced tables

Posted: Thu 19 Jul 2012 14:39
by jasmad
hi

anyone know if you can detect if a field is foreign key accessing procedures, functions or properties of TField,
and if not possible by these means it is possible to do this otherwise?

sorry about my english
fault of the google's translator

greetings

Re: detect foreign keys and referenced tables

Posted: Wed 25 Jul 2012 10:21
by ZEuS
You can use the RDB$INDICES system table to find out, whether there is a foreign key in the specified table. Then, you can use the RDB$INDEX_SEGMENTS system table to determine, what particular fields belong to the foreign key.

Re: detect foreign keys and referenced tables

Posted: Fri 27 Jul 2012 22:10
by jasmad
hi ZEuS

metadata component does not have access to this information?
instead of directly querying the database

Re: detect foreign keys and referenced tables

Posted: Tue 31 Jul 2012 08:35
by ZEuS
The TIBCMetadata component does not provide such functionality. Please use the system tables to obtain this information.