Subject Re: [ib-support] Foreign Key problem - solved
Author Chef
Hi Helen,

At 10:55 23.02.2001 +1100, you wrote:
>What happens if you use this syntax:
>
>ALTER TABLE BEHARTEN ADD CONSTRAINT FK_BEH_PLACES FOREIGN KEY
>(BEH_ID_PLACE) REFERENCES PLACES
>(PL_ID_PLACE);
>
>Helen

this didn't work, too.
I just found the problem in older mails. I had indexes defined on some of the
referenced PK fields. According to a mail of Ann Harrison there is a bug in
Interbase that prevents one from creating FKs if there are indexes on the
referenced PK fields.

I suspect these indexes were left from the migration from paradox a few years
ago when I used a tool to create a sql script of my paradox tables and then
built
the IB database with it.

I dropped these indexes and my script with about 50 FKs executed fine !

Thanks anyway Helen !

Bye,
Markus