|Subject||RE: [firebird-support] Foreign key reference target does not exist. [FB 2.5 beta 2]|
> >> I tried to create a foreign key but I always get this error:the the op never mentioned adding any records - i.e. both tables are empty.
> >> violation of FOREIGN KEY constraint "".
> >> violation of FOREIGN KEY constraint "FK_RES_TREEVIEW_1" on table
> >> "RES_TREEVIEW".
> >> Foreign key reference target does not exist.
> > this usually means you have not committed the table creation BEFORE
> > attempt to craete the foreign key. i.e. "Foreign key reference target
> > not exist."
> Sorry, but this is wrong.
> a) you can issue as many DDL statements in the same transaction as you
> b) what you should not do - is to issue DML after DDL in the same
> (not this case)
> c) error means exactly what message said - no master record with key
> corresponding to the some child record(s)
So the FK should work - no?