Subject Re: [firebird-support] compound FK fails
Author Helen Borrie
At 09:15 PM 4/03/2008, you wrote:
>The exception occurs when I attempt to define the fk
>
>ALTER TABLE TBLCGCHECKGRID ADD CONSTRAINT FK_TBLCGCHECKGRID_1 FOREIGN
>KEY (GROUPID,ASSETID) REFERENCES TBLCUSTOMASSETEDIT(GROUPID,ASSETID)
>ON DELETE CASCADE;
>
>violation of FOREIGN KEY constraint '""'. violation of FOREIGN KEY
>constraint "PK_TBLCUSTOMASSETEDIT" on table "TBLCUSTOMASSETEDIT".
>Foreign key reference target does not exist.
>
>I've tried dbworkbench and dev studio and both come back the same
>(This is version 1.5.4)

Well, I did exactly your DDL in IB_SQL (copy and paste, as DSQL statements), with commit after the creation of each table, and it all simply worked (also v.1.5.4). I'm suspicious about the tool(s) you are using: both seem to be making the same mistake, since the topmost error message as reported here is scrambled....try it with isql.

./heLen