Topic: Need help for error message

Hi Friend,
             How are you? Today I need your help to solve an error message. When I delete a record from tablegrid I get this message " FOREiGN KEY constrain failed" Any solution for this error?

Thanks

2 (edited by CDB 2020-08-23 06:47:34)

Re: Need help for error message

Unforgettable,

This means the entry is linked in two or more tables in your database. In other words you have  a table which contains all your items and then you have another table that uses an entry in that table as a foreign key, often the 'id' number.

Assuming your tables aren't corrupt, check which entry you are actually trying to delete, the foreign key in a table or the actual data.  You need to delete from all tables that the entry exists in starting with the foreign keys and then the main entry.

Check if you ticked  the 'Cascade Delete' option if you are using the inbuilt delete option.


See the attached picture.

Post's attachments

Attachment icon unforgettable_cascade_delete.PNG 41.7 kb, 112 downloads since 2020-08-23 

On a clear disk you can seek forever

Re: Need help for error message

Thank you CAN To solve my problem