It is cascade thingy (I am not the DB guy...) So it normally works OK...

If we drop the foreign key and create it again it starts to work. Data from
Both tables gets removed correctly.

Appears the there is small difference in the newly created foreign key.

For this foreign key following stuff in system tables are :

RDB$UNIQUE_FLAG = 0 RDB$INDEX_INACTIVE = 0 RDB$INDEX_TYPE = 0

And we create it again those are NULL


Do not know if that is an actual cause but difference we see.


-Tee-

On Thu, Sep 15, 2016 at 10:44 AM, Dimitry Sibiryakov <s...@ibphoenix.com>
wrote:

> 15.09.2016 9:39, Tommi Prami wrote:
> > Foreign key references are present for the record
> > Problematic key value is ("TOSITEID" = 945)
> >
> > Data is there, it can be selected but the delete fails on this DB
>
>    Delete fails exactly because data is there. You must delete referencing
> records first
> and only then - record in master table.
>
>
> --
>    WBR, SD.
>
> ------------------------------------------------------------
> ------------------
> Firebird-Devel mailing list, web interface at
> https://lists.sourceforge.net/lists/listinfo/firebird-devel
>
------------------------------------------------------------------------------
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to